We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38371
    • 42 Posts
    Hello to everyone,

    We are currently creating an e-shop extra for MODx.

    There is a requirement that each Product has some Technical Features associated with it. The Technical Features' number, type and units vary among Product Categories.

    We have decided that TVs and their Input Options could help us a long way as far as the variation in types is concerned.. However, we have not yet started extending the modTemplateVar class, because of an issue we want solved before construction takes place.

    First, allow us a small deviation.

    Looking through MODx in order to find out how the TV Panel for a Resource is rendered, we have come across the action:
    resource/tvs

    We were unable to find such a file in the path:
    /modx/manager/controllers/default/resource/

    Could anyone help us find the correct file (or action)?

    Now, for the main question.

    Say, we make TechnicalFeature class extend modTemplateVar. Then, we create a CMP where we show the Technical Features of a Product.

    We would like the Technical Features Tab to present the Technical Features the way the TV Tab presents the TVs.

    Is there a way that we could take advantage of the available modTemplateVarInputRenders?


    Thanks a lot. [ed. note: leffyrant last edited this post 14 years, 1 month ago.]
      • 3749
      • 24,544 Posts
      You could definitely show stuff from your own class in a CMP if you've done the extension properly, but do check out the MIGX extra. It may be just what you're looking for.


      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html [ed. note: BobRay last edited this post 14 years, 1 month ago.]
        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
        • 4172
        • 5,888 Posts
        I think Bob is right and MIGX can do what you need.
        Can you explain a bit more about the technical features you want to add to your products?
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 38371
          • 42 Posts
          First of all, thank your for your time.

          Now, as I said, the Technical Features share a lot of properties with Template Variables. However, there is one important attribute of a Technical Feature that distinguishes it from a TV.

          A Technical Feature has a Measure Unit. So, imagine the TV tab in a Resource panel. Every TV is listed as a form field. A Technical Feature field should have an additional field next to it for its Measure Unit to be set.

          What we would like to achieve is a separate Technical Features Tab in the Resource panel that will be the point of editing regarding the Technical Features of a Product.
            • 4172
            • 5,888 Posts
            the Tecnical features change from product to product or are the same for each product or are the same for product-groups?

            the measure units change from product to product per feature or each feature has its fix measure unit?

            how many technical features has each product?

            some examples?
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Sounds like a job for MIGx or MIGxDB to me.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 38371
                • 42 Posts
                Quote from: Bruno17 at Aug 17, 2012, 11:53 PM
                the Tecnical features change from product to product or are the same for each product or are the same for product-groups?

                There are two kinds of Technical Features:

                • a Technical Feature can be common to all Product Categories or
                • specific to a Product Category

                Related to TVs, a Product Category is to a Technical Feature what a Template is to a TV.

                Quote from: Bruno17 at Aug 17, 2012, 11:53 PM
                the measure units change from product to product per feature or each feature has its fix measure unit?

                A Technical Feature may be assigned any Measure Unit. So, the Measure Units are not related to a Product, but to a Technical Feature. Moreover, any Measure Unit may be assigned to a Technical Feature and can be changed at any time.

                For example, imagine a Technical Feature "Weight" which has a Measure Unit of Kg. Then, someone might change that to Lbs.

                Quote from: Bruno17 at Aug 17, 2012, 11:53 PM
                how many technical features has each product?

                As mentioned above, a Technical Feature is related to a Product Category. To answer the question, there is no fixed limit (theoretically) to the number of Technical Features of a Product.

                Quote from: Bruno17 at Aug 17, 2012, 11:53 PM
                some examples?


                Product: Apple Macbook Pro 13.3

                Product Category: Macbook Pro & Air

                Technical Features of Product Category

                • Manufacturer (common to all Technical Features)
                • Monitor Size (specific to this Product Category, but can be assigned to another Product Category, too)

                Measure Units

                • Manufacturer (no unit)
                • Monitor Size -> Inches