Disable the ability to add some items to the cart for online sales, but still have them visible

The online store I am currently setting up has some items for sale online and some that are for sale in-store only. I want my customers to be able to see both options, but only have the option to cart the items we are actually selling online. So far the only thing I can figure out that might work would be to set item quantities to zero, but then those items we only sell in-store will show out-of-stock which isn’t the case.

Hi @SamanthaRL

You could maybe have a different product template for in-store-only products. It could look the same as online ones but you can remove quantity and add to cart button and other suitable parts and add maybe some text " This product is in store only " and have a link to map or contact us page.

1: Tagging Products:

Assign a specific tag to in-store only products, for example, in-store.
This can be done in the Shopify Admin under Products. Select a product, and in the Tags section, add the in-store tag.

2: Modifying Theme Code:

You will need to edit your theme’s Liquid files. This can be done under Online Store > Themes > Actions > Edit code.

3: Customize Product Template:

Locate and open the product template file (usually product.liquid or product-template.liquid) in the editor.
Insert conditional Liquid code to check for the in-store tag. For products with this tag, you would disable or hide the add-to-cart button.

Example code snippet:

{% if product.tags contains 'in-store' %}
  

This item is available in-store only.

  
  
{% else %}
  
{% endif %}

Thank you so much, I have done the following steps however when I go to disable or hide the cart button, it removes the button for every single item in my shop.

To further troubleshoot, can you please provide the code snippet in your theme that you’re trying to update?

Thank you

I used the code snippet you provided for me, but Im wondering if maybe its not in the right place? (I know nothing about coding, I could not find product.liquid or product-template.liquid in the editor at all.