Populating Variables

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 4 ans
I'm adding a script to my order completion page, but I'm not sure what to fill in for the variables in NopCommerce. Any help?

_.order = "...order number goes here...";
_.subtotal = "...item subtotal goes here...";
_.currency = "...subtotal currency goes here...";
_.email = "...buyer email goes here...";
Il y a 4 ans
What version of nopCommerce?
In what .cshtml file are you trying to put the script?
What is it you're really trying to do? ;)
Il y a 4 ans
I guess you want to add script in checkout > completed.cshtml view page.
First you need to get order by id using OrderService and passed below variable like
_.order = "order.Id";
_.subtotal = "order.OrderSubtotalExclTax or order.OrderSubtotalInclTax"; // if you need to pass with tax then use order.OrderSubtotalInclTax
_.currency = "order.CustomerCurrencyCode"; //CustomerCurrencyCode is three letter e.g USD
_.email = "order.BillingAddress.Email";
Il y a 4 ans
I have a custom plugin that allows me to integrate script on any page that I need too so I won't be editing any of the .cshtml files. And I'm running on NopCommerce 3.80.

Thank you for the help! I'll see if these work.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.