Get the order details from the completed page

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Hi,

we are using nopcommerce version 2.5 and our website is http://www.truvape.co.uk.

We tried to add affiliate tracking code into our website but it requires us to extract the order details from the page where the order completes and money received. We found that the page is on completed.cshtml but I dont see an easy way to get the details such as order no. and order amount (subtotal excluding shipping) in this page.

Any help would be appreciated.

Thanks
James
11 years ago
truvape,

how are you attempting to extract it? the view you stated grabs values from the model, so you should be able to grab any of those values.
11 years ago
Thanks. But I am not familiar with the MVC model, how do I find out what variables there are in this model? Which one defines this model?

Thanks
11 years ago
Hi truvape,

To find out which model it is using, it usually declared at the top of the file. For the Details.chtml view for the Order controller, it is using:

@model OrderDetailsModel
@using Nop.Core.Domain.Orders
@using Nop.Web.Models.Order
@using Nop.Services.Localization


Take a look at that model and see if you can find what you need. If that model doesn't have what you're looking for, you will probably have to code it. Good luck!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.