Hi there,
I’m looking for a way to create a AJAX add to cart button from the native ‘button’-element. I found that it’s possible to edit the url to domain.com/?add-to-cart=[product-id]
but this results in loading a new page and redirecting to the homepage.
What I would like to do is create a button that works like the normal button: when one clicks the button the product is added without loading a new page.
The reason is that I would like to create something like this (see screenshot), where you have two buttons. That’s why a shortcode for the add to cart button is not ideal.
Any suggestions? Many thanks in advance!