Re: Remove discounted price on collection page

Remove discounted price on collection page

tomorrowgolf
Excursionist
19 0 5

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.

screenshot.JPG

Replies 9 (9)

made4Uo
Shopify Partner
3839 716 1177

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

made4Uo_0-1684345047412.png

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free
tomorrowgolf
Excursionist
19 0 5

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?

NomtechSolution
Astronaut
1245 112 152

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' %}
  <span class="discounted-price">{{ product.price | money }}</span>
{% endunless %}
​

 

oscprofessional
Shopify Partner
15960 2387 3095

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.

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing | Oscp Upsell & Cross sell App : Free | Oscp Sales & Volume Discount App : Free | Custom Pricing Wholesale App : Free
tomorrowgolf
Excursionist
19 0 5

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

oscprofessional
Shopify Partner
15960 2387 3095

Hello @tomorrowgolf 

Do you want only for one item?

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing | Oscp Upsell & Cross sell App : Free | Oscp Sales & Volume Discount App : Free | Custom Pricing Wholesale App : Free
tomorrowgolf
Excursionist
19 0 5

Yes, that's what I said in the description 😉

oscprofessional
Shopify Partner
15960 2387 3095

Hello @tomorrowgolf 

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

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing | Oscp Upsell & Cross sell App : Free | Oscp Sales & Volume Discount App : Free | Custom Pricing Wholesale App : Free

PageFly-Oliver
Shopify Partner
878 190 176

Hi @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

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.