Have your say in Community Polls: What was/is your greatest motivation to start your own business?

How can I remove the checkout option on the cart drawer for specific products

How can I remove the checkout option on the cart drawer for specific products

lukafernada
Explorer
152 2 56

Basically, if a customer orders a knife then they need to be age verified in the cart, however the 'checkout' option on the cart drawer allows them to bypass that. How do I get it so the checkout option is hidden if a knife is added to the cart.

The checkout button being this one:

Image 07-10-2024 at 16.38.jpeg

Website URL: cheffings.net

Knife products have tag: KNIFE-EMAIL

Reply 1 (1)

PaulNewton
Shopify Partner
7450 657 1565

Hi @lukafernada avoid spamming labels it's a good way to get ignored or more.

that requires an advanced theme customization modifying the cart-notification.liquid snippet and possibly javascript.

Reference https://github.com/Shopify/dawn/blob/main/snippets/cart-notification.liquid#L46  

 

Wrap the form in an if condition using tags {% if product.tags. contains "tag-name" %}... {% endif %}

If behavior is inconsistent you'll want to use a forloop to directly compare tags instead of a contains comparison.

 

If you need this customization then contact me for services
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org