Remove discounted price on collection page

Hi there,
we want to remove the “discounted price” for one item only on collection page.

Is there a way to do this? We still want customers to see it on product page though.

Hi @tomorrowgolf

Please follow the instructions below.

NOTE: This will remove the sale badge (the red sale container text) and the sale price

  1. From you Admin page, go to Products, then find the said product that you want to remove the compare price
  2. Find the Compare-at price. Make sure it is zero

See image below as reference

Hi, thanks for that.

I fear it’s slightly more complicated. We want to keep the “Compare at price” on product page level, BUT remove it from collection page for one specific product only. Do you know what I mean?

Yes, it is possible to remove the discounted price for a specific item only on the collection page while still displaying it on the product page. To achieve this, you can use a conditional statement in the collection template. Here’s an example of how you can do it:

  1. Open the collection template file in your theme editor. This file is typically named something like collection.liquid or collection-template.liquid.

  2. Locate the section of code responsible for displaying the products in the collection. This section may include a loop that iterates over the products.

  3. Within the loop, find the code that displays the discounted price. It may look something like this:

    Wrap the code that displays the discounted price with a conditional statement. In the condition, check if the current product’s handle or some other unique identifier matches the specific item you want to exclude. For example:

{% unless product.handle == 'specific-item-handle' %}
  {{ product.price | money }}
{% endunless %}
​

Hello @tomorrowgolf

You can try this code: it will be helpful to you

Go to the Online Store->Theme->Edit code->Assets->base.css>Add this code at the bottom.

.section-template--15538281087166__product-grid-padding .price-item.price-item--regular {
    display: none;
}

If the solution is not helpful to you then Please provide your store URL and, if it is password protected, please share the password so I can review it and provide a solution.

And this would only remove the “compare at price” for one specific product on collection page?

It’s only about this product: https://tomorrowgolf.com/products/tomorrow-golf-balls-single-pack-12-balls

Hello @tomorrowgolf

Do you want only for one item?

Yes, that’s what I said in the description :wink:

Hello @tomorrowgolf

You need to add a different custom class for that product price.

Hi [email removed]Tomorrowgolf,

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file base.css

Step 3: Paste the below code at the bottom of the file → Save

#shopify-section-template--15538281087166__product-grid [data-id="template--15538281087166__product-grid"] .card__information:has(>#title-template--15538281087166__product-grid-7522209595582) .price__sale s.price-item.price-item--regular{display:none}

Hope my solution works perfectly for you.

Cheers!

Oliver | PageFly