Populating Variables

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
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...";
4 years ago
What version of nopCommerce?
In what .cshtml file are you trying to put the script?
What is it you're really trying to do? ;)
4 years ago
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";
4 years ago
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.