I've been writing code to automatically populate the address fields in the order when the user is logged in.
I was using the OrderCreated event at first, but I found this doesn't work if the user logs in after they have already chosen the products.
If I use OrderPropertiesUpdated or OrderChanged and add a check so the address is only added if it isn't already there, the code works, but only if they haven't gone to the checkout yet.
Is there an event that is run every time they go to the basket or the first page of the checkout that I can use to run my address code? Can I alter the javascript to force an event to run that could do this?
Because Tea Commerce is so flexible we don't know about how the shop is setup and what steps you require your customers to go through in the cart. In your case you could make a /base call at the first step of your cart flow - or even just make an xslt extension that is in a macro that is in the first step. That way you control what happens, and when.
Forcing an event
I've been writing code to automatically populate the address fields in the order when the user is logged in.
I was using the OrderCreated event at first, but I found this doesn't work if the user logs in after they have already chosen the products.
If I use OrderPropertiesUpdated or OrderChanged and add a check so the address is only added if it isn't already there, the code works, but only if they haven't gone to the checkout yet.
Is there an event that is run every time they go to the basket or the first page of the checkout that I can use to run my address code? Can I alter the javascript to force an event to run that could do this?
Hi Pete
Because Tea Commerce is so flexible we don't know about how the shop is setup and what steps you require your customers to go through in the cart. In your case you could make a /base call at the first step of your cart flow - or even just make an xslt extension that is in a macro that is in the first step. That way you control what happens, and when.
Kind regards
Anders
is working on a reply...