Hide price & quantity of a $0.00 product on the cart page - Dawn theme

I would like to hide the price ($0.00) and quantity of a free product on the cart page (and the checkout page too if possible). I am using the Dawn theme. See attached screenshot. The website is pixilated.com

Thanks!

1 Like

Hey @nicolaschina

Follow these Steps:

  1. Go to Online Store
  2. Edit Code
  3. Find theme.liquid file
  4. Add the following code in the bottom of the file above </ body> tag
<style>
.cart-item:has(a[href="/products/event-details?variant=47667877708035"]) .product-option:nth-child(2), .cart-item:has(a[href="/products/event-details?variant=47667877708035"]) .cart-item__quantity-wrapper, .cart-item:has(a[href="/products/event-details?variant=47667877708035"]) .cart-item__price-wrapper {
    display: none !important;
}
</style>

RESULT:

If I managed to help you then a Like would be truly appreciated.

Best,
Moeed

1 Like

@Moeed it worked in this specific scenario but the problem now is that it always hides the price and quantity of the second item in the cart. Sometimes that free product might show up as the third item and the second item might be a product where I need to show price/quantity. Is there a way to make it specific to the product, rather than specific to the second item in the cart? Thank you!

Have you search this topic already on this community forum?

There are a lot of same Queries already before on this forum such as":

&&

Hey @nicolaschina

I have updated my code, try adding the updated code now. It should work and will only target that specific product of yours regardless of the position.

Best,
Moeed

That worked! Thank you!

Is it possible to remove the “FREE” price from the checkout page?

Unfortunately, No. Shopify doesn’t allows any changes on checkout page until and unless you’re on Shopify Plus.

Best,
Moeed

1 Like

Is it possible to make it so the customer cannot checkout if they have ONLY the free “Event Details” product in the cart? The “Event Details” product is tied directly to the other product in my screenshot example (and it has a few variants). I want to make it so that the customer can’t delete the photo booth product and checkout only with the Event Details. Make sense?

@Moeed :backhand_index_pointing_up: did you see this?