Invoice URL

Duong Tran asked on March 10, 2014 02:14


I need to get the URL of all invoices after generated from ecommerce to make it downloadable. Then display to a listing page.

Please help.

Recent Answers

Bryan Allott answered on March 12, 2014 00:12

Not sure there is, by default, a direct URL which points to all the invoices. It would be easy enough to create a page though which lists all the invoices in a repeater (or similar). To display the contents of the invoice (stored as HTML content in the database) you simply need to call string invoice = OrderInfoProvider.GetInvoice(OrderID); And then render the string.

0 votesVote for this answer Mark as a Correct answer

Josef Dvorak answered on March 12, 2014 09:19 (last edited on December 10, 2019 02:30)

Hello Duong,

As Bryan said, listing the order invoice via repeater or custom web part are the two easiest options in this case. First, you need to gather the data from database, for example you using a SQL data source Web part with this query:

SELECT OrderID, OrderInvoice, OrderSiteID
WHERE OrderSiteID = '{%CurrentSite.SiteID|(identity)GlobalAdministrator%}'

This will allow you to show both URL of the invoice using OrderID, and the actual HTML of the invoice, stored in OrderInvoice.

After you have setup this data source, use a Basic Repeater Web Part to list the data. You can use either this transformation to list invoice links:

<a href="~/CMSModules/Ecommerce/CMSPages/GetInvoice.aspx?orderid=<%# Eval("OrderID") %>"><%# Eval("OrderID") %></a><br />

Or this transformation, to show the actual invoices:

<%# Eval("OrderInvoice") %><br />

1 votesVote for this answer Mark as a Correct answer

Duong Tran answered on March 12, 2014 21:34

Thanks for that, it's really helpful :)

I'm integrated this HTML with ABCPDF API to convert the HTML to PDF. It's running fine :)

Regards, Duong

0 votesVote for this answer Mark as a Correct answer

evan pan answered on January 5, 2016 05:56

Hi, Duong.

As for me, I have seldom tried to convert the HTML to PDF with ABCPDF API. I wonder have you ever worked it out? Do I need another 3rd party manual toolkit? When it comes to PDF converting process, I have another question, I wonder have you ever tried to convert pdf to other image files before? As for myself, I am testing the related PDF to JPG converting, PDF to PNG converting, and PDF to BMP converting programs these days. Do you have experience about it? Any suggestion will be appreciated. Thanks in advance.

Best regards,


0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.