We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36613
    • 328 Posts
    I realised a lamps' catalogue having this structure:

    Lamp 1
    Spotlight → (Attribute: 6Volt , 12Volt)
    Upright → (Attribute: 6Volt , 12Volt)

    Lamp 2
    Suspension → (Attribute: 6Volt , 12Volt)
    Upright → (Attribute: 6Volt , 12Volt)

    Lamp 3
    Table → (Attribute: 6Volt , 12Volt)

    Lamp 4
    Suspension → (Attribute: 6Volt , 12Volt)
    Table → (Attribute: 6Volt , 12Volt)

    Each Lamp family includes the different product types, so “Lamp 3 Table” is an actual page. Moreover, each product includes the attribute volt, I was thinking of integrate the volt attribute in the Variabile Template section.

    I have now to do a search by type, product family and attribute (volt).

    If I filter the search by type (Suspension, Upright, Table) the search results will include exactly the products, i.e.: “Lamp 2 Upright”, “Lamp 3 Table” etc...

    If I filter by attribute (Attribute: 6Volt, 12Volt) the search returned to me as a result all families including products with a precise voltage, i.e.: “Lamp 3”, “Lamp 4” etc. …

    If I filter by family, the search returned to me as a result just the family, i.e.: “Lamp 3”, “Lamp 4”, etc. …

    Which is the best solution to develop this case? I don't know how to set up the search.
      • 3749
      • 24,544 Posts
      Where and how is the data stored, and what are you using to search it?
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 36613
        • 328 Posts
        Quote from: BobRay at Jul 28, 2016, 05:33 PM
        Where and how is the data stored, and what are you using to search it?
        The data store in resource and TV, I don't know the solution for search the data... i see in modx there are more modules for search for example simple search but It does not make my case function. Can you give me a suggestion ?
          • 3749
          • 24,544 Posts
          If each resource is a product, and some of its characteristics are stored in TVs, you might be able to use getResources or pdoResources to do the searching and display the results.

          You haven't said what you're currently using to search.

          Ideally, the data would not be stored in resources and TVs. It would be in the database in a custom table with fields something like this:

          Name (text)
          ProductNumber (int)
          Family (text)
          Type (text?)
          sixVolt (0/1)
          twelveVolt (0/1)
          image (text)
          price (float)


            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting