Hey there beautiful people!
Hope you’re having a great day!
I have a question related to Shopify Liquid Coding, and I’m hoping that you can help me out a little bit!
Basically, I want to have a text dynamically update when a customer increments the quantity of a product on the cart page, without the page restarting. ( Kind of, like, how the price updates on the cart page when someone increases the quantity of a product, without the page restarting.)
This is what I’ve done so far:
{% if cart.item_count == 1 %}
Add another item for 5% discount!
{% elsif cart.item_count == 2 %}
Add another item for 10% discount!
{% elsif cart.item_count == 3 %}
Add another item for 15% discount!
{% elsif cart.item_count >= 4 %}
Hooray! Maximum discount reached!
{% endif %}
And this actually works, but only if I refresh the page.
What do you think? And ideas?