What happened to the PrintMyOrder.aspx page?

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

What happened to the PrintMyOrder.aspx page?

Post by Brewhaus » Tue Sep 03, 2013 7:46 pm

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?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: What happened to the PrintMyOrder.aspx page?

Post by Katie » Wed Sep 04, 2013 8:51 am

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
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: What happened to the PrintMyOrder.aspx page?

Post by Brewhaus » Wed Sep 04, 2013 8:57 am

I am referring to the customer account area. They do not appear to have the ability to print an invoice anymore.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: What happened to the PrintMyOrder.aspx page?

Post by Katie » Wed Sep 04, 2013 9:04 am

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?
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: What happened to the PrintMyOrder.aspx page?

Post by Brewhaus » Wed Sep 04, 2013 9:50 am

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.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: What happened to the PrintMyOrder.aspx page?

Post by Katie » Wed Sep 04, 2013 9:59 am

Ok, I see what you mean, and I wonder if someone was trying to cut corners. Let me get this reported...

Thanks
Katie
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: What happened to the PrintMyOrder.aspx page?

Post by Brewhaus » Wed Sep 11, 2013 7:44 pm

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.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: What happened to the PrintMyOrder.aspx page?

Post by mazhar » Tue Sep 17, 2013 10:23 am

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.

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: What happened to the PrintMyOrder.aspx page?

Post by Brewhaus » Tue Sep 17, 2013 7:00 pm

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.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: What happened to the PrintMyOrder.aspx page?

Post by Brewhaus » Thu Sep 19, 2013 6:17 pm

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).
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: What happened to the PrintMyOrder.aspx page?

Post by Brewhaus » Mon Jan 26, 2015 2:26 pm

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?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: What happened to the PrintMyOrder.aspx page?

Post by nadeem » Tue Jan 27, 2015 3:39 am

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)

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: What happened to the PrintMyOrder.aspx page?

Post by Brewhaus » Tue Jan 27, 2015 6:25 pm

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.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: What happened to the PrintMyOrder.aspx page?

Post by mazhar » Tue Jan 27, 2015 11:42 pm

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.

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: What happened to the PrintMyOrder.aspx page?

Post by Brewhaus » Wed Jan 28, 2015 5:53 am

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?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: What happened to the PrintMyOrder.aspx page?

Post by Katie » Wed Jan 28, 2015 9:14 am

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.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: What happened to the PrintMyOrder.aspx page?

Post by Brewhaus » Wed Jan 28, 2015 9:44 am

Hi Katie. Nope, no total in the upper right
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: What happened to the PrintMyOrder.aspx page?

Post by Katie » Wed Jan 28, 2015 10:26 am

Either this is a totally custom page, or the site is using version 7? I thought you had upgraded to Gold...
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: What happened to the PrintMyOrder.aspx page?

Post by Brewhaus » Wed Jan 28, 2015 11:05 am

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! :-)
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
deverill
Lieutenant (LT)
Lieutenant (LT)
Posts: 64
Joined: Tue Jan 06, 2009 11:58 am
Location: Key West, FL
Contact:

Re: What happened to the PrintMyOrder.aspx page?

Post by deverill » Wed Feb 04, 2015 11:16 am

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

Code: Select all

class="noprint"
then if all is right it will show on screen but not when printed.

Hope it helps!
Jim

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: What happened to the PrintMyOrder.aspx page?

Post by Brewhaus » Wed Feb 04, 2015 11:55 am

Thank you, Jim. I will try implementing this as soon as I get the chance.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

Post Reply