I know, the code does not work in the cart drawer.
Topic summary
Goal: Display the crossed-out “compare-at price” in the Dawn theme’s cart drawer, alongside the current price.
What happened:
- Initial guidance added a conditional to show compare_at_price before final_price in Sections > cart-notification-product.liquid. This did not affect the cart drawer UI for the requester.
- Clarification: The earlier code worked for a cart page example, not the cart drawer. The distinction between cart page vs. cart drawer was key.
Working solution (Dawn 15.0.2):
- File: snippets/cart-drawer.liquid.
- Replace the spot where the price is rendered (originally showing item.original_price) with a conditional: if item.variant.compare_at_price is greater than the selling price, render compare_at_price as struck-through, then render the actual price.
- Practical note: The helper referenced line ~159 for the replacement; exact line may vary by store/version.
Outcome: After applying the change in snippets/cart-drawer.liquid, the compare-at price displays correctly in the cart drawer. Issue resolved.
Status: Resolved. Key takeaway: Target the cart drawer template, not the cart page/notification section.