Hide the price from the cart when for a specific product

I don’t want customers to see the price of my trial product in the Cart, but it keeps showing the price less 20% tax especially as this is a FREE product trial. Plus a pop up saying “Price Update” keeps appearing saying the same thing (I wouldn’t mind if it said FREE, but it says £8.33).

Thanks to the forum I’ve managed to hide the price on the product page.

https://wearehalohealth.com/discount/ELEVATEFREETRIAL?redirect=/products/elevate-hydration-creatine-drinks-sachets-free-trial-pack”

Use this code in “Theme settings”=> “Custom CSS”:

[data-item^="55787430740346"] del {
  display: none !important;
}

It’s tied up to the variant.id of this variant (55787430740346), but applies to the strike-through element, so second (not-discounted) instance of the same variant shows full-price (which is logical, right?)


If you want to hide price for this item completely, then try this code:

[data-item^="55787430740346"] .cart__item__price {
  display: none !important;
}

if my post is helpful, please like it ♡ and mark as a solution -- this will help others find it

@user963 hello, do you want to hide price for particular products or all the products in cart? if you are looking for particular products then we will need small code tweak

Hide the price just for the FREE Trial Pack - Even if it said FREE that would be better

Hey,
I just take a look to your store and found that you successfully hide the product price from the product page. It’s also important to hide the product price for the ELEVATE Hydration +Creatine Drinks Sachets FREE Trial Pack product on Cart drawer.

So in order to hide the price from the Cart Drawer you need to follow these steps.
Go to Shopify Admin >> Online Store >> Themes >> Edit Code >> theme.css
In the end of theme.css paste the following below code.

.cart__item[data-item="55787430740346:dd441d2a7191113ca082d3172847f343"] .cart__item__content .cart__item__content-inner .cart__item__price del {
	display: none !important;
}

Once you paste this code then the price will hide this product only.
Results:

If you need more help then feel free to ask any Question.
Thanks

Check this Liquid objects: line_item
The key is not stable, it may change from session to session. The variant.id part will not.

Hi That has removed the price in the cart which is great, and wants to charge for the second box which is perfect. However my partner gets the pop up for Price Update - screenshot at the top of this thread, but I don’t see it. I don’t want customers to see a “Price Update” screen that makes them think they will have to pay £8.33 instead of £9.99 when in fact it is free. How do we stop that “Price Update” screen from appearing?

Hey @user963,

In order to do the requested changes requires to do the custom code in your theme file.

Could you please share the 4 digits collab code along with the store url in the p/m so that I can take a look and make the requested changes.

Thanks

I can’t see it the popup. Are there any special steps to reproduce? Can’t find the “price update” anywhere…

It’s a strange one I can’t see it, but my partner gets it every time. Ill get him to refresh his browser on his phone it could be that.

onnor.myshopify

1431