Compare at price not working on 2 of 3 variants.

Solved

Compare at price not working on 2 of 3 variants.

Ayeasking
Tourist
9 1 4

Hi!
I have 3 product variants:
1) 5 bags 
2) 10 bags
3) 20 bags

All of these variants have price and compare at price. But only 3) variant is showing compare at price and badge (sale).
When I inspect, then 1) and 2) variants has no compare at price. Prices shows same as casual Price.
But for 3) variant everything is ok.
I tried to turning off Markets > Preferences > .... Nothing works.

Also, compare at price is showing like everything is ok, when I press Edit on online store and go to product page.
So the problem is with shopify, it doesn't load compare at price for 2 variants for clients. Is there any solution?

Accepted Solution (1)
Ayeasking
Tourist
9 1 4

This is an accepted solution.

I just fixed the problem.
Export product to which you want to add compare at price.
Open .csv in excel on Google Sheets (upload).
There will be column for each market compare at price.
Fill the prices.
Save. Import into Shopify.
DONE!

View solution in original post

Replies 10 (10)

tim
Shopify Partner
4253 484 1561

Share a (preview?) link to this product page on your storefront.

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
Mustafa_Ali
Excursionist
328 24 53
.price__sale, .price__availability, .price .price__badge-sale, .price .price__badge-sold-out, .price--on-sale .price__regular, .price--on-sale .price__availability {
    display: inline !important;
}

AmazingGuy_0-1743336001160.png

hey @Ayeasking follow these steps 

Go to online store ----> themes ----> go to three Dots ----> edit code ---->find theme.liquid files ----> place the code ---->
under the <style> tag before the body ----->
if this code work please do not forget to like and mark it solution

 

and if the code is work then you have to correct your price and compare price and then your problem is solved😊 

 

Ayeasking
Tourist
9 1 4

but why everything is working for 1 of 3 variants and 2 of 3 variants doesn't load compare at price and shows price like there is no compare at price? Not sure if youe code is ok and you understood problem. If 1 variant is working, why other 2 isnt?

Mustafa_Ali
Excursionist
328 24 53

i think there is some JS problem that's why some variants show compare price and some variants not showing there compare price try this code hope fully that your problem is solved with my code 😊

tim
Shopify Partner
4253 484 1561

Nah, two of your variants has no compare price -- check your product in back-end, this is not a theme problem, do not edit your theme code!

Screenshot 2025-03-30 at 10.45.52 PM.png

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
Ayeasking
Tourist
9 1 4

Now imagine that I have compare at price at backend and they show same as "Price". You don't see compare at price because of market.

tim
Shopify Partner
4253 484 1561

I've checked both languages and they both have empty compare_at_price for 2 variants.

I can't tell what's set in your backend (unless you invite me to your store), so I only can see what Shopify serves on the front end.

You can also make a bunch of screenshot from your backend.

 

What I am trying to say is that you do not need to modify your theme code -- problem is not there.

 

Wait, are you saying that compare_at_price is the same as price, or that there is a compare_at_price entered? Screenshots would help, yes. 

 

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
Ayeasking
Tourist
9 1 4

Screenshot 2025-03-30 175814.jpgScreenshot 2025-03-30 111342.jpgScreenshot 2025-03-30 111250.jpg
Here you go. Yes I know that theme code shouldn't be problem here. This is Shopify problem definitely.

Ayeasking
Tourist
9 1 4

This is an accepted solution.

I just fixed the problem.
Export product to which you want to add compare at price.
Open .csv in excel on Google Sheets (upload).
There will be column for each market compare at price.
Fill the prices.
Save. Import into Shopify.
DONE!