Developer forum

Forum » Development » How to access the OrderID from a Usercontrol which is loaded into template

How to access the OrderID from a Usercontrol which is loaded into template


Reply

ENGLISH:


I have a question.
I have a usercontrol which I load into my ecom/cart/orderconfirm.html template via: <!--@LoadControl(usercontrols/PushGatewayReturn.ascx)-->
Within the usercontrols/PushGatewayReturn.ascx.VB page I need the OrderID of the current Order (OrderID is available in the template).

I can't find it in any way ... Not through the Dynamicweb.dll, request.form, request.querystring or session values ...
It also seems impossible to pass through the OrderID as variable: <!--@LoadControl(usercontrols/PushGatewayReturn.ascx?OrderID=<!--@Ecom:Order.ID-->)-->
Can anyone tell me how to get my OrderID in my VBB page?!?

DUTCH:

Ik heb een vraagje.

Ik heb een usercontrol die ik in mijn ecom/cart/orderconfirm.html template laad via: <!--@LoadControl(usercontrols/PushGatewayReturn.ascx)-->

In de usercontrols/PushGatewayReturn.ascx.VB pagina heb ik het OrderID nodig van de order waar ik mee bezig ben.

Ik kan hem echter met geen mogelijkheid vinden … Niet via de dynamicweb dll, request.form, request.querystring of session waarden …

Ik kan de waarde toch ook niet als variable meegeven!?!: <!--@LoadControl(usercontrols/PushGatewayReturn.ascx?OrderID=<!--@Ecom:Order.ID-->)-->

Kunnen jullie mij vertellen hoe ik dit doe?

 

Kind regards / Met vriendelijke groet,

Peter Leleulya

Innovadis BV

peter@innovadis.com

Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
Hi

If you're getting the OrderID from your orderconfirm template, I assume you want to do something when the order is complete. At that time you have the Order object stored in session under "LastCart". Grab this object and cast it to Dynamicweb.eCommerce.Orders.Order and get order.ID. That should be what you want.

- Jeppe

 

You must be logged in to post in the forum