AddOrUpdateOrderLine javascript api with multiple bundled products
We're using the bundled products functionality and the javascript api to update the cart. However we have a bundled product containing, let's say, 6 number of subproducts. This means a javascript call to add this complete product to the cart will take 7 javascript calls to AddOrUpdateOrderLine (main product + 6 subproducts).
I was wondering if it would be possible to send the data to the AddOrUpdateOrderLine method in a form of an array, so instead of doing:
I think that you can do this with the HTML API and then add the class ajaxFOrm - then Tea Commerce will post that entire form in 1 ajax call and add all the order lines. Don't know your setup - but its good practice to support non-javascript people :)
AddOrUpdateOrderLine javascript api with multiple bundled products
We're using the bundled products functionality and the javascript api to update the cart. However we have a bundled product containing, let's say, 6 number of subproducts. This means a javascript call to add this complete product to the cart will take 7 javascript calls to AddOrUpdateOrderLine (main product + 6 subproducts).
I was wondering if it would be possible to send the data to the AddOrUpdateOrderLine method in a form of an array, so instead of doing:
We would like to do:
This way the overhead of 7 ajax calls is minimized to 1 call and the performance will increase signifigantly I think.
Hi Rody
That is a great idea! I will have a look at that.
I think that you can do this with the HTML API and then add the class ajaxFOrm - then Tea Commerce will post that entire form in 1 ajax call and add all the order lines. Don't know your setup - but its good practice to support non-javascript people :)
Kind regards
Anders
Hi Anders,
I've thought of that exactly and I am currently busy rewriting the page to HTML api, it is possible.
is working on a reply...