hide product price of specific product type

ecommfirst
Shopify Partner
23 0 4

Hi All, need to hide the price of a certain product type as is enquiries only. Need to hide the product price from the search.

Theme prestige, URL https://suite-nine.com/

Thanks, Daniel

Replies 8 (8)

Moeed
Shopify Partner
3878 981 1225

Hey @ecommfirst 

 

Can you tell me the exact name of your product type so then I can give you a proper code?

 

Best Regards,

Moeed

Need a Shopify developer? Chat on WhatsApp


- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️
ecommfirst
Shopify Partner
23 0 4

Hi Moeed, Do you know how I can hide the products price on the search page of my website. it still showing after your code 

ecommfirst
Shopify Partner
23 0 4

it is for product type 'watches' thank you

Moeed
Shopify Partner
3878 981 1225

Hey @ecommfirst 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

{% if product.product_type == 'watches' %}
<style>
.price {
    display: none;
}
</style>
{% else %}
<style>
.price {
    display: block;
}
</style>
{% endif %}

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

Need a Shopify developer? Chat on WhatsApp


- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️
ecommfirst
Shopify Partner
23 0 4

Hi I followed this and unfortunately the prices still show in search, see below. 

Screenshot 2024-06-04 at 12.52.33.png

Moeed
Shopify Partner
3878 981 1225

Hey @ecommfirst 

 

Try this code instead, this should work

{% if product.product_type == 'watches' %}
<style>
sale-price.h6.text-subdued {
    display: none;
}
</style>
{% else %}
<style>
sale-price.h6.text-subdued {
    display: block;
}
</style>
{% endif %}

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

Need a Shopify developer? Chat on WhatsApp


- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️
ecommfirst
Shopify Partner
23 0 4

Hi This code is still not working. Do you know any other way this can be done? the price is hidden from the collection page but I need the price hidden from the search page.

james207
Visitor
1 0 0

Hello to hide the price of a certain product type and make it an enquiry-only product in your e-commerce platform, you'll need to make a few changes. The exact steps depend on the platform or CMS you're using (e.g., WooCommerce, Shopify, Magento, etc.). Below are general instructions that should guide you through the process