Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
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 |
---|---|
237 | |
98 | |
84 | |
51 | |
42 |