Shopify themes, liquid, logos, and UX
Hello
I am currently trying to display the original price of each product (that was added to cart) on the cart page. Everything works like a charm, unfortunately only one last thing is bothering me. Normally all prices 'refresh' as soon as you change the quantity of a product. When this happens the value of every compare_at_price will be set to lowest 'compare_at_price'-value (the 'compare_at_price_min') of the current cart items. That's because 'compare_at_price' will always get the lowest value. Before changing the quanitity every value is assigned correctly.
Shopify.dev page is saying this:
product.compare_at_price
Returns the lowest compare at price of all the product's variants entered in the Shopify admin. This attribute is similar to product.compare_at_price_min.
If none of the product variants have a value for compare at price, product.compare_at_price will return nil.
Is there a way to get the 'compare_at_price' of each item itself? And not only the lowest one.
On first load
After changing qty
User | RANK |
---|---|
145 | |
98 | |
78 | |
69 | |
65 |
This blog post is a recap of the webinar Getting Ready For BFCM: How To Run A Flash Sal...
By Jacqui Oct 3, 2023Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023