24 Dec 2009, 11:59 AM
Zen Follower
- Join Date:
- Sep 2006
- Location:
- Leeds, UK
- Posts:
- 165
- Plugin Contributions:
- 0
Displaying products in the header like featured, new products sidebox
Hi,
I am trying to display the contents of a sidebox like the featured sidebox automatically in the header. For example where the banner would display.
This is the code from the /includes/templates/template_default/sideboxes/tpl_featured.php
file:
<?php /** * Side Box Template * * @package templateSystem * @copyright Copyright 2003-2005 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: tpl_featured.php 2982 2006-02-07 07:56:41Z birdbrain $ */ $content = ""; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">'; $content .= '<a href="' . zen_href_link(zen_get_info_page($random_featured_product->fields["products_id"]), 'products_id=' . $random_featured_product->fields["products_id"]) . '">' . zen_image(DIR_WS_IMAGES . $random_featured_product->fields['products_image'], $random_featured_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br />' . $random_featured_product->fields['products_name'] . '</a><br />' . $featured_box_price; $content .= '</div>'; ?>Thanks