To add a new side box you have to add code to three place.
- to your includes\languages\english\extra_definitions to define the code as your going to add a new side box
- To your includes\modules\sideboxes . here add the side box
- And last is \includes\templates\template_default\sideboxes. here contain of the side box are add.
now code for a blank side box is added named “blank_sidebox_defines.php”
<?php /** * blank sidebox definitions - text for inclusion in a new blank sidebox * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ define('BOX_HEADING_BLANK_SIDEBOX', 'Blank Sidebox Header'); define('TEXT_BLANK_SIDEBOX', 'Replace this text with your HTML content.'); ?>
No:2…. named”blank_sidebox.php”
<?php /** * blank sidebox - allows a blank sidebox to be added to your site * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ // test if box should display $show_blank_sidebox = true; if ($show_blank_sidebox == true) { require($template->get_template_dir('tpl_blank_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_blank_sidebox.php'); $title = BOX_HEADING_BLANK_SIDEBOX; $title_link = false; require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); } ?>
And last no.::3 named “tpl_blank_sidebox.php”
<?php /** * blank sidebox - allows a blank sidebox to be added to your site * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ $content = ''; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">'; // Replace the text and HTML tags between the apostophes on lines 19 and 20. // Use as many or as few lines using this model as you need for your custom content. // If you have a multilingual site define your text in the languages/YOUR_LANGUAGE/extra_definitions/blank_sidebox_defines.php and include it as shown in line 19. // If your site is monolingual, you can put the text right here as shown on line 20 (and nobody will know!) $content .= '<p>' . TEXT_BLANK_SIDEBOX . '</p>'; $content .= '<p>You can include text, links, images, HTML markup and even PHP code</p>'; $content .= '</div>'; ?>
After all added go to your admin panel and login where in tools section go to layput box controller and found your newly add side box.
Tagged: New sidebox, Sidebox, Zen cart, zencart
Hey admin, I have a small request. I was just googleing for some info on this topic you wrote and found this blog. Some really cool stuff you wrote here, can I please link to this post on my new website I’m workin on? Pretty please:) . I will check back again later to see what you answered. cheers, Ian Smith .
U can!!