We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13331
    • 67 Posts
    Hi

    My client has a product catalog with around 500 products. Each of them have their own product page. The product page template uses a.o. two template variables one that contains the price and one that holds a pricetable with alternatives. Each row in this price table contains a name, a stock number and another price for that product.

    The problems is that these pricetables are manually maintained. The number of "additional" products vary on each product page.

    Now my client wants to raise the price on all products by 5% which are easily done through an SQL query on the single price TV but I obviously can't do the same with the pricetable because I can't filter all prices when quering the rich text TV.

    I was thinking of adding a fixed amount of TVs - let's say 3 names, stockNo's and draw the table based on these values but that would limit the amount of possible additional products and it would clutter the template in the manger if no additional products were needed.

    Is there a way to create some kind og "table" TV where rows can be added/removed as needed for each page in the manager and every cell in that table will have a corresponding cell in the database? That way I could query the prices in the table as well - plus it would be a lot easier to maintain the pricetable instead of editing it through the Rich editor.

    I hope my explanation of the problem made sense.

    Thanks!
      • 4172
      • 5,888 Posts
      If it's revo the dynamic TV-part can be done with MIGX, but MIGX stores its records as JSON into one TV.

      I'm working on a MIGXdb - version, which works like MIGX, but stores its values into custom-table.
      At the moment, I haven't much time to develop it further.

      You can try MIGX and let me know, it that's the workflow you're thinking about. Perhaps I'll find some time to make MIGXdb production-ready the next coming weeks.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 9102 ☆ A M B ☆
        • 318 Posts
        What are the alternatives? Are they other products out of the original 500?

        If so, I would approach the whole setup differently. Instead of the price table TV, I would use a TV to store a comma-separated list of the id numbers of the alternative products. Then on the products page, use a getResources call to list the alternative products and their prices - just use the id list TV as the resources parameter for getResources.

        That way the price of each product is only stored in one place in the database, and updating it in that one place updates it everywhere, including all other product pages that reference it.

        I'm doing something similar with rotating banners on one site, I could post the code if it would be useful.