populating variables in code

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 年 前
Hi,

I am adding a script on to my confirmation page and I need to fill in the below, but im not sure what to add? I 'think' for the order number I need to put @Model.OrderId, but im not sure. Can anyone advise?

_.order = "...order number goes here...";
_.subtotal = "...item subtotal goes here...";
_.currency = "...subtotal currency goes here...";
_.email = "...buyer email goes here...";

Thanks
Neil
7 年 前
Hi Guys,

Anyone had any thoughts on this yet?

Thanks
Neil
7 年 前
I don't think the the Order Id is available until after confirmation step.
In any case, if you need to access fields in the Model, then you should look at the definition of that model - you will need the full source code for that.
7 年 前
Hi,
Thank you for your reply. I apologise, I meant the 'completed.cshtml' page (I always refer to that as the order 'confirmed page'.

So, does anyone know what labels I need to use to call the below on the completed.cshtml page?

_.order = "...order number goes here...";
_.subtotal = "...item subtotal goes here...";
_.currency = "...subtotal currency goes here...";
_.email = "...buyer email goes here...";

Thanks again
Neil
7 年 前
The model on that page only has OrderId and OnePageCheckoutEnabled.  You need to use the order service (via Resolve) to get the order to access additional properties.  See this topic as an example.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.