Personalized checkout and custom promotions with Shopify Scripts
Note this product has a sale price
https://marysquare.com/products/tshirt-more-love?variant=42123645878480
However, if you add it you won't see the original price on the cart.
I'm trying to add the original price with a line trough as it is on the product page but the original price doesn't even come to the fronted from the cart API request: https://i.imgur.com/JxOy2Rc.png
Is there a way for obtaining the original price from the cart page?
Hi @juan_bw, this has more to do with the cart page than Shopify Scripts (which is focused on checkout).
However, a similar question and answer has been posted here: https://community.shopify.com/c/technical-q-a/display-compare-at-price-saving-on-the-cart-and-checko...
For the cart page, find where the current item price is and update to something like this:
{{ item.final_price | money }} {% if item.variant.compare_at_price > item.variant.price %} <s>{{ item.variant.compare_at_price | money }}</s> {% endif %}
For savings, you can calculate like this:
{% assign savings = item.variant.compare_at_price | minus: item.final_price %} You're saving {{ savings | money }}!
Let me know if that was helpful,
Matthew
Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024