Shella Theme: "Compare at price" HACK with Automatic Discount

Shella Theme: "Compare at price" HACK with Automatic Discount

golomone
Visitor
2 0 0

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:

1. 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;

2. the popups My Cart and My Wishlist show only the original price, but the total is discounted compare_at_price (picture 2);

3. 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?

 

Schermata 2022-12-04 alle 19.36.34.png

Schermata 2022-12-04 alle 19.37.03.pngSchermata 2022-12-04 alle 19.37.21.pngSchermata 2022-12-04 alle 19.37.34.png

Reply 1 (1)

MPI_themes
Shopify Partner
119 2 36

You should have a developer skills to edit the theme source code. Or hire a developer to complete this task for your store.
Unfortunately, our developer is busy and can't work on your task. You may hire any other Shopify developer.

 

Best regards

Shopify App / Theme developer
https://mpthemes.net/