Shopify themes, liquid, logos, and UX
Hi gurus! I have recently installed the Boost theme and would like to be able to hide the sold prices on products that have since sold - it's important to my business that the product is still to shown the show of products we offer. I would like to hide the price when the product shows in a collection AND on the individual product page. I'm sure it's possible! Can someone help with what the code might be, or point me in the direction of where I can find this?
You should find your product.liquid file and your product-grid.liquid file, track where the price is being shown and sandwich the code the way it's done below:
{% if product.available %}
Code for Price
{%endif%}
That will thus only display prices on products that are in stock.
Let me know if that works for you!
I had to make some minor changes to what you provided (adding the dashes, below, for anyone else with this issue in the future) and find the right files, but I got there. Thanks again for your help! Greatly appreciated.
{%- if product.available -%}
{%- endif- %}
Just when I thought I had it, you can now see the sold price when the item appears in the customer's "recently viewed" list at the bottom of the page! Have tried looking at a few options, but no luck. Anyone? Am in the 'recently-viewed.liquid' folder but can't seem to make the same coding work?
Please follow up below steps.
1. Go to Online Store > Themes
2. Click on "Edit HTML/CSS"
3. under the "Snippets" folder, find a file call "product-card-grid.liquid"
4. Go to line #12
5. Wrap the price line with % comment %} ...... {%endcomment %}.
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024