Product Price Showing Twice For Sale Items

Hello,

My compare & current price is showing twice on my product pages. Please help! My website is www.bambooisbetter.com. Thank you.

Has your theme been customized at all? Have you checked your customization settings to see if this is an option in there?

If not, you’d need to post the liquid code for your product template.

When dealing with technicals link to a DIRECT example url don’t make others dig around for the right urls to reproduce an issue this also simplies communication when everyone is talking about the same thing and not multiple products.

Broad troubleshooting:

In the themes product.liquid or product-form or price.liquid snippets, etc -

More than likely someone duplicated the price logic to have some new sales logic but didn’t adjust the surrounding logic to not output the old price logic.

Or with things like sales badges or marketing inserts when something is on sale they grabed a chunk of the price logic by accident and doubled it.

Rule out javascript issues - Disable javascript and see if issue gone.

Or look through the view source in the browser for a problem product using ctrl+U and see if the duplicate prices are present in the html itself which lowers chance it’s a javascript issue.

Hello @bibtq ,

To resolve this problem. You need to add the below-provided code just before the closing head ()tag.

Follow the steps to do the same.

  • Go to Shopify admin > Online store > Themes
  • Select your Theme > Action > Edit code
  • Open theme.liquid file from the layout folder
  • Search tag and paste the below code before this tag
  • Save the changes

{% if template.name == “product” and product.selected_or_first_available_variant.compare_at_price > product.selected_or_first_available_variant.price %}

.price__regular{ display: none !important; }

{% endif %}

This will resolve your issue. Let us know if you need any further help.

Regards,

CedCommerce

Thank you, that worked for the product page, but it is still showing on the collection page. Please advise, thank you.

Hi @Bibtq

This is PageFly - Advanced Page Builder. I would love to give you some recommendations

-Go to Online Store->Theme->Edit code

-Asset-> theme.css paste the below code at the bottom of the file.

.product-card__image-with-placeholder-wrapper:has(.sale) ~.product-card-title dl.price.price–listing.price–on-sale> .price__regular { display: none;

}

Hope my solution works perfectly for you!

Best Regards;

PageFly

It worked, thank you!

you are welcome, I am glad when can help you :heart_eyes: