We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18219
    • 826 Posts
    Quote from: davidm at Aug 30, 2006, 05:31 AM

    Quote from: Marc at Aug 30, 2006, 03:03 AM
    But when I used: &filter=`tvtype_pdt, [*type_pdt*], 1 | tvlieux_pdt, [*lieux_pdt*], 1` or &filter=`tvtype_pdt, Chaise, 1 | tvlieux_pdt, Restaurant, 1` or &filter=`tvtype_pdt, Chaise | tvlieux_pdt, Restaurant` I obtain nothing. :’(
    Did you try activating the debug mode to have a better grasp of why you get nothing ?
    Yes. I have a same result : nothing. It was my first action to find the origin of the problem. That makes it possible to know the value of the variables.

    Quote from: kudolink at Aug 30, 2006, 08:03 AM

    I use many multiple filters, for example:
    &filter=tvregione,toscana|tvcatvinoit,vinoit
    

    And it works.
    Remember that Ditto filters widgeted TVs, for example if the TV has value of "hello" and the widget is set to "uppercase" the filter needs to be "tvWithTvPrefix,HELLO".
    Learnt on my skin smiley

    Here my code :
    [!Ditto? &tpl=`ListProducts` &startID=`30` &language=`french` &debug=`1` &displayArchive=`0` &filter=`tvtype_pdt, [*type_pdt*]| tvlieux_pdt, [*lieux_pdt*]` &mode=`development` &summarize=`99` &sortBy=`pagetitle` &sortDir=`ASC` &truncText=`Voir la fiche produit` !]
    

    I do not use any widget in my TVs. On the other hand both are ListBox (multiple select).
    Perhaps that is the origin of the problem.
    type_pdt can take the values: Chaise and Table, or Chaise or Table
    lieux_pdt can take the values: Restaurant and Ecole, Restaurant or Ecole
    Because a chair can be sold for a restaurant as for a School. Contrary, in a restaurant, one can find chairs or tables.

    You tested this type of configuration in your tests?
    Thanks
      Marc
      I'm French... Sorry for my bad English, I use ' Google Translator' or other... but that remains that tools wink
      • 6726
      • 7,075 Posts
      There was an issue with multiple selects, and there is a fix from Raymond smiley
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 16429
        • 254 Posts
        Quote from: Marc at Aug 30, 2006, 08:58 AM

        Here my code :
        [!Ditto? &tpl=`ListProducts` &startID=`30` &language=`french` &debug=`1` &displayArchive=`0` &filter=`tvtype_pdt, [*type_pdt*]| tvlieux_pdt, [*lieux_pdt*]` &mode=`development` &summarize=`99` &sortBy=`pagetitle` &sortDir=`ASC` &truncText=`Voir la fiche produit` !]
        

        I do not use any widget in my TVs. On the other hand both are ListBox (multiple select).
        Perhaps that is the origin of the problem.
        type_pdt can take the values: Chaise and Table, or Chaise or Table
        lieux_pdt can take the values: Restaurant and Ecole, Restaurant or Ecole
        Because a chair can be sold for a restaurant as for a School. Contrary, in a restaurant, one can find chairs or tables.

        You tested this type of configuration in your tests?
        Thanks
        There is some trouble using TVs with multi-select capabilities to filter by. The Filter param can’t recognize Chaise if the TV has "Chaise" and "Table" selected at the same time.
        In fact these compose a single value, not different values, so it’s difficult to filter it. Try outputting the TVs in plain page [*type_pdt*] to see what’s the difference of the 3 cases you have.

        I’ve had a similar problem with multiple checkboxes: I bypassed the problem splitting from one multi-select checkbox TV to various single-checkbox TVs which I can happily filter by (by single filter or sequences of multiple filters separated by pipes "|").
          kudo
          www.kudolink.com - webdesign (surprised?)

          [img]http://www.kudolink.com/kudolinkcom.png[/img] [sup]proudly uses[/sup] [img]http://www.kudolink.com/modx.png[/img]
          • 18219
          • 826 Posts
          Quote from: davidm at Aug 30, 2006, 10:25 AM

          There was an issue with multiple selects, and there is a fix from Raymond smiley
          A last version of Modx (0.9.2.1) include a fix.
          Thank David for search...

          Quote from: kudolink at Aug 30, 2006, 10:38 AM

          ...
          There is some trouble using TVs with multi-select capabilities to filter by. The Filter param can’t recognize Chaise if the TV has "Chaise" and "Table" selected at the same time.
          In fact these compose a single value, not different values, so it’s difficult to filter it. Try outputting the TVs in plain page [*type_pdt*] to see what’s the difference of the 3 cases you have.

          I’ve had a similar problem with multiple checkboxes: I bypassed the problem splitting from one multi-select checkbox TV to various single-checkbox TVs which I can happily filter by (by single filter or sequences of multiple filters separated by pipes "|").
          I also think that Ditto does not take into account the filters with multi-select checkbox or listbox. I will re-examine my TVs.
            Marc
            I'm French... Sorry for my bad English, I use ' Google Translator' or other... but that remains that tools wink
            • 16429
            • 254 Posts
            Quote from: Marc at Aug 30, 2006, 01:15 PM

            I also think that Ditto does not take into account the filters with multi-select checkbox or listbox. I will re-examine my TVs.

            Wait: I haven’t told Ditto does not take them into account... I’ve told it’s difficult to filter by those.
            To filter by a tv you’ve to use the exact, case sensitive output of the tv. And it’s difficult to say what a multi-select (checkbox or list doesn’t mean) tv is outputting.
            Try to output in a page the value of a combined tv.
              kudo
              www.kudolink.com - webdesign (surprised?)

              [img]http://www.kudolink.com/kudolinkcom.png[/img] [sup]proudly uses[/sup] [img]http://www.kudolink.com/modx.png[/img]
              • 18219
              • 826 Posts
              Quote from: kudolink at Aug 30, 2006, 01:27 PM

              Quote from: Marc at Aug 30, 2006, 01:15 PM

              I also think that Ditto does not take into account the filters with multi-select checkbox or listbox. I will re-examine my TVs.

              Wait: I haven’t told Ditto does not take them into account... I’ve told it’s difficult to filter by those.
              To filter by a tv you’ve to use the exact, case sensitive output of the tv. And it’s difficult to say what a multi-select (checkbox or list doesn’t mean) tv is outputting.
              Try to output in a page the value of a combined tv.
              I will look in this way too. Thanks
              In fact, I have problem of connection ADSL in this moment with my provider. I cannot answer quickly. Also I work much locally. I had understood this possibility well. I intend to look at the code of the snippet so that it takes into account the multi-select. To use several TVs to replace a listbox multi-select does not give satisfaction. Remain to see in the two ways:
              - To look at the value of a TV
              - To look at the code of Ditto
              Then to look at what I can do. I will post the result of my research the next week. perhaps somebody goes more quickly than me wink
                Marc
                I'm French... Sorry for my bad English, I use ' Google Translator' or other... but that remains that tools wink
                • 18219
                • 826 Posts
                Hi,
                I confirm the filter of Ditto does not take into account the multi-select of a TVs. The selection of 2 values will form a chain without any character which separates the values.
                Example: If tvtype_pdt has ’Chaises’ and ’Tables’ values, it return ’ChaisesTables’ value.

                So in &filter=`tvtype_pdt,Chaises|tvlieux_pdt,Restaurant`, I obtain all the chairs for the restaurants but if one of it is also appropriate for a school, it will not appear in the list since the TV contains the value “RestaurantEcole”.

                There remains the way to modify Ditto so that he takes into account these multi-select. I did not look at his code yet. But it is the only way which it remains to obtain what I would like.

                Last Edit : Help me, the code is complex. I do not understand it.
                  Marc
                  I'm French... Sorry for my bad English, I use ' Google Translator' or other... but that remains that tools wink
                  • 18397
                  • 3,250 Posts
                  MARKSVIRTUALDESK Reply #18, 20 years ago
                  Ditto does take into account multi-select TV’s. Until your last post it wasn’t clear that you were choosing several values yet only wanted to filter 1of those. To do this you need to do the following.

                  1. Create a TV that returns the values of tvtype_pdt and tvlienux into a comma delimited list as the tagging system in Ditto can only use one TV for the tagData at the moment.
                  2. Use the following Ditto options to filter the list

                  &tags=`Chaises,Restaurant`
                  &tagData=`aggregatedTVName`
                  &tagDeliminter=`,`
                  &tagMode=`onlyAllTags`

                  Then everything should work as expected.
                    • 6726
                    • 7,075 Posts
                    Nice tip Mark, I still had no opportunity to work with tags, now I see how I can make use of them smiley
                      .: COO - Commerce Guys - Community Driven Innovation :.


                      MODx est l'outil id
                      • 18397
                      • 3,250 Posts
                      MARKSVIRTUALDESK Reply #20, 20 years ago
                      Try out the new Ditto 1.1 Beta 1 which supports multiple tagData sources so you can do this without an aggregating TV!