Variations in table instead of dropdown ajax add to cart
-
Hi,
I’m trying to display my variations in a table and the only problem I’m having is with the button ‘Add to cart’. I’m using a form to call the ‘add_to_cart_url()’ but what I really want is to have the themes ajax version of this button. How can I achieve this?
Thank you very much,
Diogo Rosa
Hello,
Thank you so much purchasing our theme and contacting our support center.
If you want to keep this button work with AJAX you need to be sure that you don’t change HTML markup and CSS classes for this button.
Kind Regards
XTemos Studio
It doesn’t seem to work as you say, I’m overriding the function ‘woocommerce_variable_add_to_cart()’ should I do it in a different way?
But this function simply shows the template file. What exactly do you edit there?
In the screenshot, the table is composed of all variations and each variation has an add to cart button, I want this button to function with your ajax implementation.
Attachments:
You must be
logged in to view attached files.
Sorry, but our AJAX function works only with WooCommerce variations form and its HTML selects. It may require extra JS & PHP customization to make it work with AJAX with your table also.
Ok thank you for the information.
Contact us if you have any additional questions or concerns.
The topic ‘Variations in table instead of dropdown ajax add to cart’ is closed to new replies.