Debut - Remove Add to Cart Button - Changes to product code aren't updating for the product

precip
Tourist
5 0 2

Hello,

I am trying to remove the add to cart button on the Debut theme and I can't get it to work.

I tried following the recommended tutorials, and it seems the real problem is that my product does not seem to care what I do to the code, nothing changes. Even if I delete the contents of product.liquid and product-template.liquid, the product displays just fine. So I'm thinking there is something not setup right.

In the product-template.liquid file I have commented out the code which I believe should make the "add to cart" button disappear.

{% comment %}
<button type="submit" name="add"
{% unless current_variant.available %} aria-disabled="true"{% endunless %}
aria-label="{% unless current_variant.available %}{{ 'products.product.sold_out' | t }}{% else %}{{ 'products.product.add_to_cart' | t }}{% endunless %}"
class="btn product-form__cart-submit{% if section.settings.enable_payment_button %} btn--secondary-accent{% endif %}"
data-add-to-cart>
<span data-add-to-cart-text>
{% unless current_variant.available %}
{{ 'products.product.sold_out' | t }}
{% else %}
{{ 'products.product.add_to_cart' | t }}
{% endunless %}
</span>
<span class="hide" data-loader>
{% include 'icon-spinner' %}
</span>
</button>
{% endcomment %}

The theme template is set to "product" for the product in question.

precip_0-1595708488578.png

 

Otherwise the product.liquid and product-template.liquid files are stock.

I've tried the method in this tutorial: https://www.youtube.com/watch?v=NWWHk1y0kPg&feature=youtu.be

And I've tried all the shopify tutorials where you made new template files, mod the code, and then update the theme template for the product to the new theme. 

https://shopify.dev/tutorials/customize-theme-replace-add-to-cart-button#:~:text=Assign%20your%20new...

https://avada.io/shopify/devdocs/hide-add-to-cart-buttons-temporarily.html

https://github.com/Shopify/liquid/issues/313

Nothing has worked.

What am I missing? Website is www.precipmoto.com.

Thanks,

Steve

 

0 Likes
precip
Tourist
5 0 2

Anyone have any ideas?

@Lizzy 

0 Likes
KetanKumar
Shopify Partner
20440 2115 7712

@precip 

Welcome to the Shopify community!
and Thanks for your Good question.

1. Go to Online Store->Theme->Edit code
2. Asset->/theme.scss.liquid->paste below code at the bottom of the file.

.product-form {
display: none;
}

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
precip
Tourist
5 0 2

Thank you for the quick reply @KetanKumar ! 

Unfortunately adding that to the code did not remove the add to cart button.

I didn't exactly have theme.scss.liquid, I had theme.js, does that make a difference?

precip_0-1596422552502.png

 

0 Likes
KetanKumar
Shopify Partner
20440 2115 7712

@precip 

you have wrong place code 

please add this file

2. Asset->/theme.scss.liquid->paste below code at the bottom of the file.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
precip
Tourist
5 0 2

Thanks you were right, that did the trick! Thanks so much!

KetanKumar
Shopify Partner
20440 2115 7712

@precip 

Thanks for update and your compliment.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
monorailespress
New Member
1 0 1

I have a question, I followed these instructions and it worked but it actually didn't work out overall. I deleted the code from that section in order to have the Add to Cart option available again and it won't update the products to have the button. Any suggestions?

KetanKumar
Shopify Partner
20440 2115 7712

Hello, @monorailespress 

Welcome to the Shopify community!
and Thanks for your question.


Please share your site URL,
So I will check and provide a solution here.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes