Section Button make it add product to cart

Section Button make it add product to cart

jeffreym
Pathfinder
147 3 30

Hello, I would like this apps button to be the same design as the picture (1 example) and I would also like so when i press the 'add to cart' button on the app section where the video is located (2nd image), that it adds the product to cart instead of sending me to a page.

Thank you in advance!

URL: Hygiadental.com
pw: myown

Screenshot 2025-03-12 at 12.25.03 AM.pngScreenshot 2025-03-12 at 12.26.30 AM.png

Reply 1 (1)

Huptech-Web
Shopify Partner
1084 211 233

Hi @jeffreym 
To add the product to the cart, use the code below. Add this code in theme.liquid in the footer before </body>

 

 

<script>
$(document).ready(function() {
$('.video-text-button-button_7XGnBN').on('click',function(e){
    e.preventDefault();
   $('.product-form__submit').trigger('click'); 
});
});
</script>

 

 

Add this code to theme.liquid before </head> 

 

<style>
.product-form__submit {
    width: auto;
}
</style>

 

 

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required