Shopify themes, liquid, logos, and UX
At the bottom of my product page I want to add another add to cart button. I can only add a button then link it back to the product page but not add to cart.
Solved! Go to the solution
This is an accepted solution.
please update the code
<div style="display: flex;justify-content: center;">
<button id="product-form__submit-2" style="color: #23232;" type="button" class="button button--secondary">
<span>Add to cart</span>
</button>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.getElementById('product-form__submit-2').addEventListener('click', function(event) {
event.preventDefault();
document.querySelector('.product-form__submit').click();
});
});
</script>
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Hi @jeffreym
You can add an HTML button into a Custom Liquid block at the bottom of your product page template and then add the script to trigger the Add to Cart button when clicking this custom button.
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Okay understood, Do you have this said script?
Hi @jeffreym
You can try to use this code
<button id="product-form__submit-2" type="button" class="button button--secondary">
<span>Add to cart</span>
</button>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.getElementById('product-form__submit-2').addEventListener('click', function(event) {
event.preventDefault();
document.querySelector('.product-form__submit').click();
});
});
</script>
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Okay, That puts an add to cart button on the page now I will need to centre the button & make the text black
This is an accepted solution.
please update the code
<div style="display: flex;justify-content: center;">
<button id="product-form__submit-2" style="color: #23232;" type="button" class="button button--secondary">
<span>Add to cart</span>
</button>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.getElementById('product-form__submit-2').addEventListener('click', function(event) {
event.preventDefault();
document.querySelector('.product-form__submit').click();
});
});
</script>
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Honestly, you guys that help us newbies are amazing! I thank you kin sir!
You are very welcome!
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Hi @Dan-From-Ryviu,
Can you change the add to cart button to request a quote button, It should send a query when someone clicks on request a quote on the product page. It should not proceed to the cart page and checkout. let me know if you can do so. it should include variant selection and send clients' data to the owner's email.
Need a Shopify Expert and Specialist? Let's chat on WhatsApp +923046983349 and bring your vision to life!
Custom Shopify Store Design | Premium Themes | Variant Apps Expert
Your Coffee Tip a seamless synergy. ☕❤️
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025