Jump to content

help with a print function


samoht

Recommended Posts

Hello again,

 

I have an order confirmation process - at the end of which is a view of the order and a message saying "thank you... to continue shopping click here... or print a copy for your records."

 

I have to much going on in the page to just print the screen - so I would like to set up a print page that is stripped down to the order and the relevant info from the page.

 

any Idea on the best approach??

 

should I make a print.php and just link there passing the order info?

Or should I write a function that prints only certain info from the current page??

Link to comment
Share on other sites

You can use css for this. Look into CSS print media.

 

Basically you set all the elements in your page to display:none; that your don't want to be printed in your print stylesheet, call this stylesheet print.css for example. You then link to this style sheet using a link tag in the head, eg:

<link rel="stylesheet" media="print" href="print.css" type="text/css" />

 

When a user goes to print the page your browser will use the print.css file rather than your normal stylehsheet.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.