Jump to content

How to customize Order Page for printing?


Recommended Posts

Hello all.

 

I am looking for help on how to customize the Order Summary page in the admins back-office for saving paper costs when printing. As of right now, each order printed takes up 3 sheets of paper when it can easily be printed on 1. 

 

Is there a way to only print out certain information? Customer name, address, payment information, and product purchased, mainly?

 

I have already tried printing delivery / invoice slip but this information is not enough for my record keeping.

 

I have gone in and experimented with certain .tpl files and was able to remove an unneeded block from the actual backoffice view of the order summary. I dug deeper and found that all it is doing is calling a JS script for "window.print" and basically just taking a print screen of the page im viewing when i click "Print Order"
 

If this can be customized somehow, or possible a FREE module to make this work...that would be awesome. Any help would be appreciated. Thank you!

 

 

Share this post


Link to post
Share on other sites

  • 8 months later...

A little more info. That blurb in the doc only affects invoices, not the "Print Order" button. The "Print Order" button is based on this file:

 

/adminxxxx/themes/default/template/controllers/orders/helpers/view/view.tpl
 
Unfortunately, editing that file affects both the screen version of the order and the printed version. I have not found a way to edit the print version only.

Share this post


Link to post
Share on other sites

  • 4 weeks later...

I would also like to have the printed page changed but not the viewing page. I think this isn't actually that complex if we have a "hidden" view.tpl file, that would be called something like print.tpl and then we would just change that template, so when we click print it would grab the content of that page and not the actual view.tpl we were viewing.

 

If someone can achieve this, please let us know. :)

Edited by plima (see edit history)

Share this post


Link to post
Share on other sites

Have you checked into Store Manager for Prestashop (MagneticOne)? It allows you to print out either a full view of an order page or just a pack slip. Allows one to download a sample/test. Program is not free, not cheap. But a real time saver.

Share this post


Link to post
Share on other sites

  • 1 month later...
Hello everyone,

 

I could customize my print page easily by editing the file:

 

Note that there is class this way: /adminxxxx/themes/default/template/controllers/orders/helpers/view/view.tpl

 

class="hidden-print" hiding in print, search in document for hidden-print

class="visible-print" shown in print, search in document for visible-print

 

 

To hide for example the tab content "documents" Print I modified the div in question to:

 


<div class="tab-pane" id="documents">

<h4 class="hidden-print">{l s='Documents'} <span class="badge">({$order->getDocuments()|@count})</span></h4>

<div class="hidden-print">{* Include document template *}

{include file='controllers/orders/_documents.tpl'}</div>

</div>

 

 

Hope that helps you. Regards to all.

  • Like 3

Share this post


Link to post
Share on other sites

  • 7 months later...

Feeling a bit dumb, but in my version of PS 1.6, I can't find this file path  /adminxxxx/themes/default/template/controllers/orders/helpers/view/view.tpl   No "template" folder within my theme or the default theme??

Share this post


Link to post
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
  • 1 month later...
  • 3 weeks later...

 

Hello everyone,
 
I could customize my print page easily by editing the file:
 
Note that there is class this way: /adminxxxx/themes/default/template/controllers/orders/helpers/view/view.tpl
 
class="hidden-print" hiding in print, search in document for hidden-print
class="visible-print" shown in print, search in document for visible-print
 
 
To hide for example the tab content "documents" Print I modified the div in question to:
 
<div class="tab-pane" id="documents">
<h4 class="hidden-print">{l s='Documents'} <span class="badge">({$order->getDocuments()|@count})</span></h4>
<div class="hidden-print">{* Include document template *}
{include file='controllers/orders/_documents.tpl'}</div>
</div>
 
 
Hope that helps you. Regards to all.

 

It works fine in PS 1.6!!!

It need to adjust with css action "display:none" with Paypal tab and other tab.

Thanks!

Share this post


Link to post
Share on other sites

 

class="hidden-print" hiding in print, search in document for hidden-print
 

 

Thanks, you ROCK! I was able to unprint a huge chunk of the file without affecting the display. I'm not quite out of the woods, though. It still prints a half-page worth of paypal data, and that data doesn't appear to be coming from /adminxxxx/themes/default/template/controllers/orders/helpers/view/view.tpl. Also, it prints the line of "gamification" data at the very top (the line that starts with "Advice" and ends with "Read"). I have tried to use the "hidden-print" method in the associated view.tpl files for payment and gamification, but it's not working. Any ideas?

Share this post


Link to post
Share on other sites

  • 10 months later...

Hello,

i modified tpl file using class hidden-print and now if i inspect the elements in the page, the class is applied on the elements i choose, but when I print, those elements still remains in the sheet printed.

Is it something regarding the printer or the browser?

 

thanks

Share this post


Link to post
Share on other sites

  • 1 year later...

You can use the class "gmnoprint" if you must change the tpl file...

Another thought (without any code changes) that may work depending on your needs - - Click the VIEW INVOICE tab and use that instead of the PRINT ORDER button

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More