Hi,
I have created a Discount Code that applies to a specific Collection called Outlet.
This Automatic Discount is only visible when I go to the checkout (picture 4), but it was not visible on the product page nor cart.
To get the discount to show on the product page and cart page, I decided to hack the logic of compare_at_price.
Basically for me compare_at_price should display the Sale price < original price, which I manually set according to the Automatic Discount.
I am using the Shella Theme template so I modified product-get-label-sale.liquid and product-get-price.liquid setting the if condition to {%- if compare_at_price < price -%} then switching price and compare_at_price.
This solution works perfectly for me (picture 1) but I’m experiencing 3 problems:
-
if I change the size/variant of the product, both sale label and discount disappear and I must refresh the page to show them again;
-
the popups My Cart and My Wishlist show only the original price, but the total is discounted compare_at_price (picture 2);
-
Shopping Cart and Wishlist pages instead shows discounted price and discounted total compare_at_price, which is ok (picture 3) but it would be better to see both prices as the product page (picture 1).
Can someone help how to solve the refresh issue on the variant price, and what must be done to show correct discounted price in the popups in Shella Theme?



