Developer forum

Forum » Development » CartV2 with no order lines

CartV2 with no order lines

Thomas Larsen
Reply
Order template extender is not called on existing order with no order lines

Replies

 
Thomas Larsen
Reply
Order template extender is not called on existing order with no order lines
 
My step 1 of the cart contains both order information and order lines, and I need to
display custom information from the order template extender. But the CartV2 clears
the cart if no lines exists…?


 
Morten Snedker
Reply
Hi Thomas,

We understand an order as an order+orderlines. So, whenever last orderline is removed the cart is cleared, and hence no order template extender triggered. This is by design.

Regards /Snedker
 
Thomas Larsen
Reply

Hi Morten,

I understand, but is it possible to add a new option/action in the CartV2 module when cart is empty. This option should create new cart without lines and render as a normal cart, incl. a call to the order template extender?


 
Morten Snedker
Reply
 Hi Thomas,

No, this is not possible. You cannot have a Dynamicweb cart without orderlines.

The only workaround is if you with custom code create your own order object, do to it what you need to do, and once you again add orderlines you can apply this order object to the cart.


Regards /Snedker

 

You must be logged in to post in the forum