I am trying to create a downloadable product.
I attach a downloadble File to the product when the user
has made a purchase. And it should be available for download when user clicks on Order Details,
but the links provided do not work.
Nop will give me some link with a guid attached but it does not open the file.
example (http://localhost:15536/OnlineTicketHttpG/40679895-b438-447c-833e-6249cfe12e70)
Whats missing. what do I need to write in downloadlink. The physical location or ...?
string downloadLink = _webhelper.GetStoreLocation(false) + @"OnlineTicketHttpG/" + orderItem.OrderItemGuid;
Nop.Core.Domain.Media.Download ticketDownload = new Download()
{
DownloadGuid = orderItem.OrderItemGuid,//Guid.NewGuid(),
UseDownloadUrl = true,
ContentType = "application/pdf",
DownloadUrl = downloadLink,
Extension = "pdf",
Filename = "Ticket_" + orderProductId + ".pdf"
};
_downloadService.InsertDownload(ticketDownload);