What's your biggest current challenge? Have your say in Community Polls along the right column.

How to calculate product price based on input values ?

How to calculate product price based on input values ?

soha_raees
Shopify Partner
3 0 0

I have created a form on the product page In which I added radio button for monogram I want to add 5$ in product price if radio input value is yes otherwise, price will remain same . How it is done in liquid ?

the form is

soha_raees_0-1714638713091.png

code is

<b>Product Price</b>{{product.price}}
<p class="bold-label">
  4:Monogram<span class="red">*</span> <span class="inch">(+$5), </span>
</p>
<br />
<div class="fit" role="radiogroup">
  <input
    type="radio"
    id="Monogram_No"
    name="properties[Monogram]"
    form="product-form- {{ product.id }}"
    value="No"
    checked
  />
  <label for="Monogram_No">No</label>
  <input
    type="radio"
    id="Monogram_Yes"
    name="properties[Monogram]"
    form="product-form- {{ product.id }}"
    value="Yes"
  />
  <label for="Monogram_Yes">Yes</label>
</div>

similar functionality is done in this store https://www.cutlengthservice.com.au/products/shaw-aventus-5 .

How it is done in liquid ?

Replies 0 (0)