Developer forum

Forum » Ecommerce - Standard features » Multiple products via CartCmd=addMulti

Multiple products via CartCmd=addMulti

Tom-Erik Paulsen
Reply

Hi!

Im currently working on an "jquery wizard" for adding multiple products to basket.

I have to run the "add products" via an .post or .get

But there seems to be something missing in my "code"

Any idea of where I go wrong?

$.get('/default.aspx?ID=142&ProductID1=PROD116&Quantity1=3&ProductLoopCounter1=1&ProductID2=PROD116&Quantity2=3&ProductLoopCounter2=2&cartcmd=addMulti');

See attachement for a better syntax overview.

49.png

Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

You cannot use add multi using get. It has to be post.

 

Also use the template that has addmulti example, and check out the post it makes (using browser developer tools or Fiddler) and compare to your own post.

Votes for this answer: 1
 
Tom-Erik Paulsen
Reply

Thanks for the comment Nicolay ;)

I managet to do the task after Kristian K guided me to this thread:

http://developer.dynamicweb-cms.com/forum/development/adding-multiple-products-in-the-cart.aspx

 

Works like a charm now. :)




 

 

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

So I have this exact problem, and search the forum and get christmas-lights in my eyes when I see that Tom-Erik Paulsen has found the solution, and even posted a link.

But unfortunately, the link is dead. This happens a lot.

Wish Dynamicweb could update all the dead links.

/Hans

 

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Nice to get help from a five year old post. smiley

I'm working on some ajax stuff for the cart and addMulti did not want to work for some reason. Now I know. Because of my updateCart method uses GET. 

And now it works. yes

/Aki

 

You must be logged in to post in the forum