View Single Post
  #6  
Old 09-14-2018, 05:53 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Custom add to cart with ajax

Hi @lakin1,

I assume you use the 2nd method described here:
https://devs.x-cart.com/customization_examples/inserting_an_x-cart_'add_to_cart'_button_in_a_new_page.html

If so, the problem might be that the submit event is triggered for each the 'form.custom-add2cart' form.

Code:
$('form.custom-add2cart').each(function () { ... }

You may need to adjust this JS code and submit only particular form instead of all of them.

Let me know if it helps.

Tony

Quote:
Originally Posted by lakin1
Hi Tony,
I am trying to show product variants in product details page in tabular format.
And each table row will contain one add to cart button with its own quantity.
Also we have our own stock management system etc.

Hope it helps.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote