Stuck on "Hide the Add to cart button"

Highlighted
New Member
4 0 0

Hello, 

I'm trying to replace the add to cart with a contact link. I've followed all the steps on https://shopify.dev/tutorials/customize-theme-replace-add-to-cart-button this site until I stop at Hide the Add to cart button. 

I've done step 1 but the rest I'm having trouble with. What I'm seeing in my files is not what is listed on here to complete the task.

  1. When you find the code, wrap it in Liquid {% comment %} and {% endcomment %} tags. This will stop the code from being shown on your store, but will let you easily put it back if you want to change your new template later.

    For Narrative, the modified code would look like this:

    liquid {% comment %} {% include 'product-form' %} {% endcomment %}

  2. Click Save.

 

Is there an simpler way to complete? I'm novice so I'm also worried I'm going to mess something up I don't know how to fix. 

0 Likes
Highlighted
Astronaut
1075 173 211

Hello,

Thank you for your question. 

Please share your store URL, page URL and also password (if your store has one), I'll help you out to the best of my ability.

Kind regards,
Diego

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Hire me! Recommended by 25+ customers on Facebook. Click here to read their reviews.
◦ Contact me at: diego.boarutto.fortes@gmail.com
0 Likes
Highlighted
New Member
4 0 0

Sorry it took me so long to reply. Please let me know if you need more information. Thanks SO much!!

https://my-forget-me-knot-keepsakes.myshopify.com/

Password: heatau

https://my-forget-me-knot-keepsakes.myshopify.com/products/custom-order-request?_pos=1&_sid=b9d9e88b...

 

 

0 Likes
Highlighted
Astronaut
1075 173 211

To hide the "add to cart" button you can use CSS code.

1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find Asset > theme.scss.liquid and paste this at the bottom of the file:

 

 

.template-product button[id*='AddToCart'],
.template-product  .shopify-payment-button{
    display: none !important;
}

 


Let me know whether it works.

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Hire me! Recommended by 25+ customers on Facebook. Click here to read their reviews.
◦ Contact me at: diego.boarutto.fortes@gmail.com
0 Likes
Highlighted
New Member
4 0 0

So I completed the step that you suggested and I'm not sure I did it right. I know I did that step correct just not sure about the others. Is there another route to go to remove the add cart button? I'm not tech savvy.  

0 Likes
Highlighted
Astronaut
1075 173 211

@Christina1121

as a disclaimer, removing the add to cart button is quite dangerous since the sole purpose of an e-commerce is to sell. Therefore it's important to know exactly what is going on behind the scenes to avoid major issues in the future. 

if you're unsure about the code you're injecting into your store I'd highly recommend getting a hold on a Shopify developer to assist you through. It will save yourself loads of time and money for the future. the potential for this sort of code to get messy in your store is fairly high.

Kind regards, 

Diego 

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Hire me! Recommended by 25+ customers on Facebook. Click here to read their reviews.
◦ Contact me at: diego.boarutto.fortes@gmail.com
0 Likes