Developer forum

Forum » CMS - Standard features » Add information to empty cart

Add information to empty cart

Adrian Ursu
Reply

Hi Guys,

I would like to add information to cart (like address and email) before the users ads anything to cart.

I have noticed that this works only if the user has anything in cart. Otherwise the information from the form is not submitted to the cart.

Is there any way I can override this?

Thanks,

Adrian


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Adrian

I don't think that is possible. The cart is deleted when there is no more products in it.

If you have the address information on the user, and they are logged in, you have that information in the user session and can get it from there...

BR Nicolai

 
Adrian Ursu
Reply

Hi Nicolai,

I was afraid of this answer :)

But it totally makes sense.

The user can have several addresses and it has to choose the address before starting the order.
I guess in this case I will have to add the selected address in a Session (or cookie) variable until the user gets to the cart.

Thanks a lot,

Adrian

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Could we assign a new car to Context.Cart through extensibility?

 
Nicolai Høeg Pedersen
Reply

You probably can, but I think (not 100% sure) that Dynamicweb will see it, and kill it.

Try adding one product, add information on the order, delete the product, see what is in the database, and add a product again...

 

You must be logged in to post in the forum