We’d like to display the compare_at_price in our checkout summary next to the current price of a product. Currently the checkout summary is rendered using a built-in liquid method:
{{ content_for_order_summary }}
In order to do this, it seems like we’d need to completely rewrite the logic provided by the content_for_order_summary method. This includes the form for dicount codes, displaying the shipping summary, etc. We have capable shopify developers on hand so are able to write code, but I just don’t see how we can realistically rewrite and customize an internal shopify function and all of its edge cases etc.
Hey Wildabeast above code will add compare at price twice once shipping page is changed or discount code is added, Here’s updated version of code to avoid that:
Just to add to the previous code. I have expanded on this so the code shows the percentage discount next to each item and it also shows total savings in the list of subtotals in the sidebar beneath the items
Hi, we’re on Shopify Plus but I’m looking to add this to my cart page it actually pulls through natively in the Checkout. Do you know which file I should be adding this to or is it theme specific?
Hi there! Very helpful! Did you know how to show the compare-at-price in the cart page as well? I would appreciate a lot if you can help me! I am using dawn theme
Hi there! Very helpful! Did you know how to show the compare-at-price in the cart page/cart drawer as well? I would appreciate a lot if you can help me! I am using dawn theme