Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
Hi
We are planning to build a shopping cart website for a cake shop. Is there a provision in couch cart where the price of the product is updated based on selection of a parameter. In our case we want the price to change on the display page when the user selects the weight of the cake. So if he selects 1 kg the price will be 1000 if he selects 1/2 kg the price will be 500. Based on the item selected these details should go the final checkout page.

Alok
Hi Alok,

I think one way of doing this would be through the use of 'variants' (https://docs.couchcms.com/concepts/shop ... -variants-).

For example, you could define 1Kg as the base product and then define the other fractions as its variants.
This way the cart will automatically use the correct prices.

You might want to tweak a few things in the way the products are displayed on the frontend though. Looking at the demo at http://www.couchcms.com/demo/simple/, you'll see that, by default, Couch displays only the price difference with each variant (e.g. +15). You'd want to show the full price here. This can be done by using the tag-pair version of cms;pp_option_values (this is demonstrated at https://docs.couchcms.com/concepts/shop ... g-products).

Secondly, you'd also want the main price that is shown in the heading to change with the selected variants. That is a frontend issue and can easily be handled through JS.

Hope this helps.
2 posts Page 1 of 1