I would like to remove the shop button add to cart and more option buttons from this page and only leave the Amazon button. Would you please assist
Hello,
-
Go to Online Store > Find the theme > Click 3 dots actions menu > Edit Code.
-
Find your assets folder > click section-main-product.css file.
-
Copy and paste this code at the bottom of the file.
.product-form__buttons {
display: none;
}
You only want to hide those buttons on that specific page? O in the whole website?
The code I gave you it removes them from the entire website.
Let me know!
Only for this product. Not the whole website. Thank you so much for you assistance
I only want the Amazon one for this product.
The best approach for this, I think is using javascript.
Online store > Theme > Actions menu > Edit code.
Assets > product-form.js (file)
copy and paste this code, and save.
const inputWithValue = document.querySelector("input[value='41503038898315'].product-variant-id");
if (inputWithValue) {
const formToRemove = inputWithValue.closest('form');
const formButtonsToRemove = formToRemove.querySelector('.product-form__buttons');
formButtonsToRemove.remove()
}
Let me know!
I didn’t have to update the code. I researched and saw someone created a new page template. I did that for that 1 product (created a new template and just rename it …no modifications) and then I literally clicked the buttons I wanted to remove and deleted them. It’s working perfectly. I wanted to give thanks to the person that posted that before but I forgot the name.