Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

printer friendly page


korsh

Recommended Posts

I am trying to create a printer friendly page of account_history_info.php so a customer can print their account history. I think I have it linked up right ( I am viewing the pages on Apache as a local host http://localhost/catalog)

When I click on the print button (http://localhost/catalog/print.php) the acount history info page doesn't show and I just see the copyright message from the end of print.php. What am I missing?

 

Here's what I have done so far

 

I firstly created a print button image

 

then to english.php

I added define('IMAGE_BUTTON_PRINT', 'Print');

 

 

then I placed the print button next to the Header Title replacing the Header Title image and the <!-- Start --> and <!-- END CONTENT --> tags

 

<!-- body_text //--><!-- START -->

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><td align="center"><?php echo '<a href="print.php">' . tep_image_button('button_print.gif', IMAGE_BUTTON_PRINT) . '</a>'; ?></td>

</td>

........

deleted for brevity

........

 

<tr class="infoBoxContents"><!-- END CONTENT -->

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, tep_get_all_get_params(array('order_id')), 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

<!-- body_text_eof //-->

 

........

 

I added print.php to catalog folder

 

// ---Print.php --//

?>

 

<HTML>

<HEAD>

<BASE HREF="<? echo "http://$myServer$base_url/"; ?>">

<!-- NOTE! I recommend you set up a stylesheet which is specific -->

<!-- for the printed page. If you do not want to do this then -->

<!-- comment the next line out. Otherwise replace the printable.css -->

<!-- with the name of your style sheet -->

<link rel="stylesheet" href="abbetoys.css">

 

<?

// --- DO NOT MODIFY ---

$f_contents = file($url);

foreach($f_contents as $line){

if(ereg($START_CONT,$line)){

$content=1;

}

if(ereg($END_CONT,$line)){

$content=0;

}

if($content==1){

echo $line;

}

}

?>

<!-- Place your Copyright message here -->

<HR>

<CENTER>

<SMALL>Copyright © <U>Abbetoys.com</U>. All rights reserved.</SMALL><BR>

<?echo "<A HREF=\"$url\"><SMALL><I>$myURL</I></SMALL></A>\n";?>

</CENTER>

</BODY>

</HTML>

 

 

 

Some help here steering me in the right direction would be appreciated.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...