I tried integrating a free shipping progress bar into my cart drawer but it is not properly updating.
It is only updated and displayed properly when refreshing the page. When the page is not refreshed it looks like this:
When the page is refreshed it looks like this:
HTMl & CSS
{% if cart.total_price < 7000 %}
{% assign shipping_amount_cents = 495 %}
{% assign subtotal_with_shipping_cents = cart.total_price | plus: shipping_amount_cents %}
{% else %}
{% assign shipping_amount_cents = 0 %}
{% assign subtotal_with_shipping_cents = cart.total_price %}
{% endif %}
Javascript:
@Issyeissue use the code formatting button, avoid walls of text.
Provide theme names, or inspectable example urls of the work so far etc etc
Read: https://community.shopify.com/c/blog/how-to-get-support-from-the-community/ba-p/1399408
The code probably needs the proper javascript event , or event targets, for the specific theme.
Event names varies wildly among themes but you’ve omitted critical detail and provided no inspectable url.
Or there are bugs in the code & theme that need to be debugged which is beyond the scope of the forums.
For debugging services my contact info is in my forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Good Luck.
2 Likes