Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to include html_output.php into header.php?


reflous

Recommended Posts

I'm hacking out header.php to change the look/feel of my shopping cart and I'd like to use some functions within html_output.php. Apparently that file is not currently included in header.php. I'm hesitant to drop require(DIR_WS_FUNCTIONS . 'html_output.php'); within the header.php since the file is already included by application_top.php and I'm not sure why header.php doesn't know that. What would be the best way for me to do this?

 

Thanks!

Link to comment
Share on other sites

It is already included, as the pages first load the application_top.php file, then the header.php file is loaded. To use the functions in html_output.php just call them. For example the following line in header.php uses the tep_href_link and tep_image functions from html_output.php:

 

<table border="0" width="100%" cellspacing="0" cellpadding="0" >
 <tr class="header">
<td align="center" valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a>'; ?></td>

</table>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...