Need to change variant price value divide_by:10

5 0 1

Hello Team,


I need help related to the "selected variant price" divide_by: 10


My Product Variant Price: Rs 1500

Need to Change Price: Rs 1500/10 = Rs 150


I have already achieved almost, but the problem is The value will change after refreshing the page.



<div class="price">

{% assign price = product.selected_or_first_available_variant.price %}
{% assign value = "10" %}
<p class="alert alert-success" role="alert">Final Cost :{{ price | divided_by: value | money }}/-</p>


So, I want this value to change with the selected variant price value without page refresh. Kindly help how I will do it. It is possible or not, and can I use JavaScript for the real-time view.



Rajni Bobel

Replies 2 (2)
Shopify Partner
5581 640 1498


{{ product.price | divided_by: 10 }}


try out this type.

If helpful, please Like and Accept Solution. Hire Us |
if you Want to modify or Customize your theme | Whatsapp | Email us:
Top Rated Shopify Agency, | We have Over 200+ Happy merchants.
Build Successful Shopify Stores with GemPages
5 0 1


Thanks for your reply.

my code is working, but the problem is the "selected variant price" update after refreshing the product page.