Shopify themes, liquid, logos, and UX
Is there a way to hide the price on a product card when the price is set to $0? Across the entire site?
I found this question/answer to hide the price if the quantity is zero (sold out) and it worked:
Is there a way to modify that code snip for the theme.liquid page to be "if product price is 0", not "sold out"?
<style> .price.price--sold-out { display: none; } </style>
Solved! Go to the solution
This is an accepted solution.
Go to price.liquid assuming you are on dawn theme.
Then,
Add a condition on price__regular div.
You can add whatever logic you want on it.
Results:
My Tuxedo doesn't show price because the price is $0.
Let me know if you have further questions or need help on anything else.
This is an accepted solution.
Go to price.liquid assuming you are on dawn theme.
Then,
Add a condition on price__regular div.
You can add whatever logic you want on it.
Results:
My Tuxedo doesn't show price because the price is $0.
Let me know if you have further questions or need help on anything else.
Wonderful, this worked perfectly! I wasn't sure what to write (or where to put it).
You were correct - Dawn theme. I was able to easily locate the price.liquid file and add the code you highlighted + endif section at the end. Thank you so much!
Hey @Taknify Can you help me with a different solution approach for the same code you shared ?
1, hide the price of the product when it is "zero" from both the product card and product details page , Also remove the add to cart button and show a different button with a custom link ? Can you help me for this ?
I'm trying to do the same. Will let you know if I come up with a solution.
Is there someone who knows where to add it in the Focal theme?
User | RANK |
---|---|
204 | |
172 | |
80 | |
58 | |
48 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023