Add to cart on archive/other pages

Hi there,
I’ve got an ‘add to cart’ button in my product cards that I also use around the site (normal pages and archives) yet it doesn’t seem to work:
https://staging-burgesspetcare.kinsta.cloud/shop/

When hovering over, the URL does show the product ID, so it is finding that from the loop.
Also AJAX is on in Woocommerce.

Any ideas?

Hello @RubberDuckers,

Thanks for writing in! In your Button element, you need the following:

1.) ?add-to-cart={{dc:woocommerce:product_id}} for the URL:

2.) And has a custom class add_to_cart_button ajax_add_to_cart

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.