Using AJAX Add to Cart with a Link
-
Hello,
I would like to know if it is possible to use an AJAX link to add a product to the cart using a URL format like this:
ruby
Copier le code
https://yoursite.com/?add-to-cart=123
I want this link to add the product to the cart and automatically open the mini cart. Can you please let me know if this is feasible with the Woodmart theme, and if so, how to achieve it?
Thank you in advance for your help!
Best regards
Hello,
Without the URL format you can add the product to the cart and automatically open the mini cart.
Navigate to Theme Setting -> Shop -> Shopping cart widget -> Choose action after add to cart button.
Navigate to WooCommerce -> Setting -> Products -> Enable AJAX add to cart buttons on archives.
https://prnt.sc/7WwjYQEdcMh8
If you have any questions feel free to contact us.
Best Regards.