Hello, I have changed the code so that when an item is listed at $0, the price does not show on the product page. I use Globo Product options to create add ons with the prices I want to use. When I go to the cart, it still shows $0 for the product.
How do I remove the $0 label in the cart for that item and just show the add on prices?
In my image I have the item. The Add on prices are for the style of shirt, and back of shirt text.
Hello,
I am San from MS Web Designer.
To hide the $0 price in Shopify, you need to include an additional condition in the theme code. Locate the price code in the product-template.liquid template and insert the following condition:
{% if product.price > 0 %} Add the price code here {% endif %}.
Hope this helps.
Do let me know in case of any concerns.
Regards,
San
Hi @dimensionalpw ,
If I’m correct, your main product is a virtual product set at $0.00, and the actual product your customers select and purchase is the add-on. Is that right?
If so, hiding the price on the product page won’t prevent the $0.00 price from appearing in the cart.
However, if you switch to using the Easify Product Options app (which allows you to set up the same options), we can offer two solutions
:
- Add custom code to hide the $0.00 price of the main product in the cart.
- Merge the main product and add-on into one item in the cart, with the total price displayed instead of $0.00.
Please note that these solutions work on the cart page, but due to Shopify restrictions, customizing how the product appears on the checkout page may be challenging.