Page 1 of 1
What happened to the PrintMyOrder.aspx page?
Posted: Tue Sep 03, 2013 7:46 pm
by Brewhaus
We are finally able to start some final testing and tweaking of our Gold site and found that customers can no longer print proper invoices. In AC7 they could view the order and there was a link to a printable version of the invoice. This appears to have been removed in Gold. Am I just missing it, or is it gone? I cannot see why this would be removed, but if it has, can anyone advise how we can recreate it in Gold?
Re: What happened to the PrintMyOrder.aspx page?
Posted: Wed Sep 04, 2013 8:51 am
by Katie
Hi Rick,
From the main Order summary page, you should be seeing a PRINT INVOICE button at the top of the Billing Information section.
Thanks
Katie
Re: What happened to the PrintMyOrder.aspx page?
Posted: Wed Sep 04, 2013 8:57 am
by Brewhaus
I am referring to the customer account area. They do not appear to have the ability to print an invoice anymore.
Re: What happened to the PrintMyOrder.aspx page?
Posted: Wed Sep 04, 2013 9:04 am
by Katie
Sorry. I didn't read your post very carefully, did I? The AC broke, and my office is like 120 degrees, so my brain is on the verge of a meltdown! Anyway, if you view the invoice, there is a PRINT button next to the REORDER button. Do you see them?
Re: What happened to the PrintMyOrder.aspx page?
Posted: Wed Sep 04, 2013 9:50 am
by Brewhaus
Yes, but the Print button prints the enter webpage as it is viewed online. It does not print a proper invoice. For some customers (primarily drop-ship wholesale customers, who need a paper copy of their invoice but are not receiving the package, therefore they do not receive an invoice from us), they need to be able to print a proper invoice from our website.
Re: What happened to the PrintMyOrder.aspx page?
Posted: Wed Sep 04, 2013 9:59 am
by Katie
Ok, I see what you mean, and I wonder if someone was trying to cut corners. Let me get this reported...
Thanks
Katie
Re: What happened to the PrintMyOrder.aspx page?
Posted: Wed Sep 11, 2013 7:44 pm
by Brewhaus
Is there any word on this? I am trying to figure out how to create this myself, and have managed other than the fact that the popup window has the "Admin" layout instead of the "customer-side" layout.
Re: What happened to the PrintMyOrder.aspx page?
Posted: Tue Sep 17, 2013 10:23 am
by mazhar
Here is the working print my order page ported from AC77. In order to install the mod first you need to extract it somewhere. Then copy
PrintMyOrder.aspx and
PrintMyOrder.aspx.cs files to your
Website/Members folder. Copy
print.css to your theme folder under
Website/App_Themes folder. Edit styles.css file in this patch and copy its contents and paste them at the very bottom of your own style.css in your theme. Now edit your theme's
style.skin file and locate following line
Code: Select all
<cb:Style runat="server" CssUrl="style.css" TargetMedia="All" DeviceConstraint="Standard"></cb:Style>
and then replace it with
Code: Select all
<cb:Style runat="server" CssUrl="style.css" TargetMedia="All" DeviceConstraint="Standard"></cb:Style>
<cb:Style runat="server" CssUrl="print.css" TargetMedia="Print" DeviceConstraint="Standard"></cb:Style>
and save it.
Lastly Edit your
Website/Members/MyOrder.aspx page and locate following code
Code: Select all
<asp:HyperLink ID="PrintButton" runat="server" Text="Print" CssClass="button hyperLinkButton" NavigateUrl="javascript:window.print()" />
and update it
Code: Select all
<asp:HyperLink ID="PrintButton" runat="server" Text="Print" CssClass="button hyperLinkButton" NavigateUrl="~/Members/PrintMyOrder.aspx" />
then edit
Website/Members/MyOrder.aspx.cs file and locate following code
Code: Select all
OrderSubscriptions.Order = _Order;
and update it like
Code: Select all
OrderSubscriptions.Order = _Order;
PrintButton.NavigateUrl += "?OrderNumber=" + _Order.OrderNumber.ToString() + "&OrderId=" + _Order.Id.ToString();
Once done hopefully now you will be able to see the ported invoice page from AC 7 and print it.
Re: What happened to the PrintMyOrder.aspx page?
Posted: Tue Sep 17, 2013 7:00 pm
by Brewhaus
Thank you, Mazhar. That worked. The invoice layout is messed up, but hopefully I can compare to the layout in Admin/Orders/Print/Invoices.aspx, or the AC7 Members/PrintMyOrder.aspx and figure out how to correct it. If I manage I will post it.
Re: What happened to the PrintMyOrder.aspx page?
Posted: Thu Sep 19, 2013 6:17 pm
by Brewhaus
With the release of R6 I have spent much of the day upgrading my DEV to R6, and whatever had caused the layout issues has been repaired, as the layout is normal now. HOWEVER, the payment information block is completely blank (ie. no Item Subtotal, Shipping, or Total).
Re: What happened to the PrintMyOrder.aspx page?
Posted: Mon Jan 26, 2015 2:26 pm
by Brewhaus
We are now running R8 and have had two customers just today complaining that they are unable to print invoices from their account. The print button is simply not functioning, and when I try the steps above then clicking on the print button just takes you to the ../MyAccount.aspx page. Can anyone help with this?
Re: What happened to the PrintMyOrder.aspx page?
Posted: Tue Jan 27, 2015 3:39 am
by nadeem
Can you post the generated URL when you hover the 'Print' button? There are two possibilities for this to happen:
1) if you are not passing the order id in query string like this
Code: Select all
PrintButton.NavigateUrl += "?OrderNumber=" + _Order.OrderNumber.ToString() + "&OrderId=" + _Order.Id.ToString();
2) Secondly it can happen if the user trying to print invoice is not the one the order belongs to i.e.
Code: Select all
if (_Order.User != null && _Order.User.Id != AbleContext.Current.UserId)
Re: What happened to the PrintMyOrder.aspx page?
Posted: Tue Jan 27, 2015 6:25 pm
by Brewhaus
The link when you hover over the print button (for order 131208) is javascript:window.print()?OrderNumber=131208&OrderId=131164
I have tested on multiple computers with multiple browsers and nothing happens when you click the button.
Re: What happened to the PrintMyOrder.aspx page?
Posted: Tue Jan 27, 2015 11:42 pm
by mazhar
Edit your Website/Members/MyOrder.aspx page and locate following line of code
Code: Select all
<asp:HyperLink ID="PrintButton" runat="server" Text="Print" CssClass="button hyperLinkButton" NavigateUrl="javascript:window.print()" />
and update it like
Code: Select all
<asp:HyperLink ID="PrintButton" runat="server" Text="Print" CssClass="button hyperLinkButton" NavigateUrl="~/Members/PrintMyOrder.aspx" />
Save the file and now it should work. Though in order to test you need to try to print some of your own order. If you try to view some customers order it may redirect you to MyAccount page.
Re: What happened to the PrintMyOrder.aspx page?
Posted: Wed Jan 28, 2015 5:53 am
by Brewhaus
Thank you, Mazhar. This worked.
The only problem with the invoice that prints is that there is no subtotal or total shown. Each line item is shown, as well as the shipping charge, but no total. How do we get the total to display?
Re: What happened to the PrintMyOrder.aspx page?
Posted: Wed Jan 28, 2015 9:14 am
by Katie
Don't you see a separate section in the upper-right part of the page that is lableled "Order Total"? If not, maybe you can provide a screenshot of what you are seeing.
Re: What happened to the PrintMyOrder.aspx page?
Posted: Wed Jan 28, 2015 9:44 am
by Brewhaus
Hi Katie. Nope, no total in the upper right
Re: What happened to the PrintMyOrder.aspx page?
Posted: Wed Jan 28, 2015 10:26 am
by Katie
Either this is a totally custom page, or the site is using version 7? I thought you had upgraded to Gold...
Re: What happened to the PrintMyOrder.aspx page?
Posted: Wed Jan 28, 2015 11:05 am
by Brewhaus
We did upgrade to Gold (R8), but must have put our previous MyOrder.aspx and .cs pages in. I have changed that to the files found in the full version of R8 and the print button does work. The only drawback is that it prints the box to submit a new note to the order and the Reorder, Print, and Submit buttons (ie. the entire contents of the body). That is a minor concern, though. At least now people can print their orders.
Thank you again!

Re: What happened to the PrintMyOrder.aspx page?
Posted: Wed Feb 04, 2015 11:16 am
by deverill
Rick, if I understand your situation properly, this is the method we use to make things not print.
At the top of your style.css (or other controlling CSS file) add this:
Code: Select all
@media print {
.noprint {
display: none;
}
}
@media screen {
normal css contents
} // end of screen section
the @media print applies to pages printed and @media screen applies to on-screen display. If you then take the elements or sections that you do not want to print out, but that you do want on your screen, and add
then if all is right it will show on screen but not when printed.
Hope it helps!
Jim
Re: What happened to the PrintMyOrder.aspx page?
Posted: Wed Feb 04, 2015 11:55 am
by Brewhaus
Thank you, Jim. I will try implementing this as soon as I get the chance.