Developer forum

Forum » Ecommerce - Standard features » Adding two orderlines - containing the same product - to cart at the same time, but with different orderlinefield values

Adding two orderlines - containing the same product - to cart at the same time, but with different orderlinefield values

Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi

I have been searching the forum and documentation, but can´t quite find anything the answer I am looking for

I want to add two orderline fields to the cart with one add button. The orderline will contain the same product, but with different orderlinefield values, and maybe different amount.

Can´t quite figure out how the form for this would look like. What distinguishes one orderline from another in the form? How does the system know where one orderline begins, and another one ends?

/Hans

 


Replies

 
Nicolai Pedersen
Reply

Hi Hans

You are looking for addmulti and setmulti commands: https://doc.dynamicweb.com/documentation-9/ecommerce/frontend/cart-commands#10180

BR Nicolai

 
Nicolai Pedersen
Reply

Also check this post: https://doc.dynamicweb.com/forum/development/development/cartcmd-addmulti-with-special-orderline-field

Remember to use a POST on the form.

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Perfect, thank you Nicolai

 

will try this 👍🏻

 

/Hans

 

You must be logged in to post in the forum