We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36626
    • 51 Posts
    Hello. What is the best way to update a TV based on user input? For instance: I have a TV *price and I want to update it whenever a user selects a size option from a select box. Also, the values in the select box are pulled from a MIGX TV.

    Any input would be greatly appreciated.
      • 6038
      • 228 Posts
      A common pattern I have seen to this problem is to create a 'base' price for a product and then have all size options contain a modify amount
      eg small = +$0, medium = +$2, large = +$5,
      So you would set your base price in your *price tv and then have three more size tvs (S/M/L) each requiring a modifying amount to be entered by the admin.

      For the user, you would probably update the price using a javascript function in the page
        • 36626
        • 51 Posts
        Hi Christian, that's the basic pattern that I have in place. The one issue I face is that the price increases aren't constant. The prices differ based on manufacturer. So a XXL from Manufacturer A might cost an additional $10 and a XXL from Manufacturer B might cost an additional $15.

        I think you've somewhat answered my question regarding the user. I wasn't sure if JS was the way to go or if I should use a binding or snippet.

        thanks
          • 6038
          • 228 Posts
          If you have tv's for S / M / L / XL / XXL attached to a product template, then it would be possible to customise the add-on costs for each product.

          Regarding updating the price on the user side - this provides nice quick updates, but you should be re-calculating or verifying the correct amount on server side, because it is too easy to mess with js smiley