How can I remove prices for sold out items with the Impulse Theme? I want the prices to be hidden from all pages when something sells.
Hello, @bbtrudell Please Follow these Steps
-
Access Your Shopify Admin Panel: Log in to your Shopify admin panel.
-
Navigate to Your Theme: In the left sidebar, go to “Online Store” and then click on “Themes.”
-
Edit Code: Find the theme you’re using (Impulse), and click the “Actions” dropdown menu. Select “Edit code.”
-
Locate the Product Template: In the code editor, look for the product template. Typically, it’s named something like “product.liquid” or “product-template.liquid.” You can find this under the “Sections” or “Templates” folder.
-
Identify Price Display Code: In the product template, you should find the code responsible for displaying the product price. It may look something like this
{{ product.price | money }}
- Add Conditional Logic: Surround the price display code with conditional logic that checks if the product is sold out. You can use Liquid’s {% if %} statement for this. Here’s an example of how to do it
{% if product.available %}
{{ product.price | money }}
{% endif %}
-
This code will only display the price if the product is available (not sold out).
-
Save Changes: After making the code changes, click the “Save” button to save your edits.
-
Repeat for Other Templates: If you want to hide prices on other pages (e.g., collections), you may need to locate and edit the corresponding templates and add the same conditional logic.
-
Test Your Store: It’s crucial to thoroughly test your store to ensure that the prices are hidden for sold-out items across all relevant pages.
-
Publish Your Theme: Once you’re satisfied with the changes and they work as expected, click the “Publish” button to make your modified theme live
Hi! Thank you so much for your help, but I am unsure if I am to replace that code, or simply add it? Everything I am doing does nothing to the website.
Hello, I need more help with this.
@bbtrudell Hello this solution is useful so please like and accept the solution
and any other Help please join us Check my signature
Hello @bbtrudell ,
You can connect with me. Check my Signature below.