How do I show sideboxes on just some pages?

Let's say for example you want to show your Zen Cart featured sidebox on all enabled pages except the main page. To do this you will need to have FTP or file manager access, a plain text editor such as PSPad and a bit of coding experience.

In this tutorial we will create an override for the Zen Cart featured products side box module file.

First we will copy the default featured products module file (includes/modules/sideboxes/featured_products.php) to your custom template override folder (includes/modules/sideboxes/YOUR_TEMPLATE_NAME/featured_products.php). If you haven't a folder in modules/sideboxes/ with your correct template name, you can create one.

Once copied over, download /YOUR_TEMPLATE_NAME/featured_products.php to your computer and open it in PSPad for editing.

Find this line of code

$show_featured= true;

and change it to read

if ($this_is_home_page) {
$show_featured = true;
} else {
$show_featured = false;

Now save the file and upload it to includes/modules/sideboxes/YOUR_TEMPLATE_NAME/featured_products.php. The conditional statement you just added will allow for your Zen Cart featured products sidebox to display on all enabled pages, except the main page.

© 2003-2015 PRO-Webs, Inc. Woodbine, GA 31569-2051