Howdy, I added some code to my cart-notification.liquid file that displays the price when someone adds something to their cart, the only problem is the price doesn’t update unless the page is refreshed, I was given a snippet of JavaScript code using ajax to fix this but either I am not implementing it right or It doesn’t work. Please help, I really need to figure this out. Below is my code.
{% comment %}
Renders cart notification
Accepts:
- color_scheme: {String} sets the color scheme of the notification (optional)
Usage:
{% render 'cart-notification' %}
{% endcomment %}
{% style %}
.cart-notification {
display: none;
}
{% endstyle %}