| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Custom add to cart with ajax | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Custom add to cart with ajax
Hi ,
I want to know how to add a custom add to cart button with ajax form submission inside xcart custom odule development. Please let me know. Thanks. xcart - 5.3.5.5
__________________
xcart 4.7 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Custom add to cart with ajax
You should try looking for examples in the existing code of X-Cart, I'm sure it has some. Then just copypaste the examples.
Also, this might help. * https://devs.x-cart.com/
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||
|
|||||||
Re: Custom add to cart with ajax
Quote:
Hi , I am following this tutorial. https://devs.x-cart.com/customization_examples/inserting_an_x-cart_'add_to_cart'_button_in_a_new_page.html I placed a form and js. But it seems like some default xcart js is conflicting due to which form is submitted twice. please advise.
__________________
xcart 4.7 |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Custom add to cart with ajax
Hi @lakin1,
Could you please let me know what page you are putting this 'Add to cart' button on? Thank you. Tony Quote:
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
#5
|
|||||||
|
|||||||
Re: Custom add to cart with ajax
Quote:
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.
__________________
xcart 4.7 |
|||||||
#6
|
|||||||||
|
|||||||||
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:
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:
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
|
|||
X-Cart forums © 2001-2020
|