Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need to link to a single product


bryanba

Recommended Posts

Posted

I recently installed the All Products contrib, which places a link to a single page containing all the products in your store in the header of the categories box. I modified it to show the link to that page in the first position of the categories box (in bold, but you should be able to figure out how to un-bold it if you wish). Here's the end of my /catalog/includes/boxes/categories.php:

 

  tep_show_category($first_element); 

 $info_box_contents = array();
/* ### HACK - All Products - add 'All Products' link to top of categories box
 $info_box_contents[] = array('text' => $categories_string);
*/
 $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_ALL_PRODUCTS) . '"><b>' . ALL_PRODUCTS_LINK . '</b></a><br>' . $categories_string);
// HACK ###
 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- categories_eof //-->

 

Voila! A link to a static page with the filename and text defines in the standard locations in adherence with osC coding standards.

 

HTH.

Archived

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

×
×
  • Create New...