New Zenner
- Join Date:
- Aug 2009
- Posts:
- 59
- Plugin Contributions:
- 0
Create a Global Sidebox
Hi all,
I have been reading around the forums and web trying to work it out and i'm still a bit at a lost.
https://www.ozresort.com.au/ is the site i am talking about.
I want to display tpl_womens_sidebox.php on every page (products, categories, EZ Pages, etc.. ). At the moment it is only shown on category pages that are defined in the file.
<?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 $
*/
$sql = "select count(*) as total
from " . TABLE_PRODUCTS . " p, " .
TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_status = '1'
and p.products_id = '" . (int)$_GET['products_id'] . "'
and pd.products_id = p.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
$products_id_current = (int)$_GET['products_id'];
$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!)
//BY SWIMWEAR BRAND > TOP LEVEL CATEGORY
if ($current_page=='index' && $cPath=='1_7')
{
$content .= '<img src="images/spacer.gif" height="5" width="100"><br>
<a href="index.php?main_page=index&cPath=1_7"><strong><font color="#006282">BY SWIMWEAR BRAND</font></strong></a><br />
<img src="images/spacer.gif" height="5" width="100"><br>
:: <a href="index.php?main_page=index&cPath=1_7_38">SEAFOLLY</a><br />
:: <a href="index.php?main_page=index&cPath=1_7_13">BAKU</a><br />
:: <a href="index.php?main_page=index&cPath=1_7_15">JETS BY JESSIKA ALLEN</a><br />
:: <a href="index.php?main_page=index&cPath=1_7_103">MIRACLESUIT</a><br />
:: <a href="index.php?main_page=index&cPath=1_7_149">GINJA</a><br />
:: <a href="index.php?main_page=index&cPath=1_7_104">GOTTEX</a><br />
:: <a href="index.php?main_page=index&cPath=1_7_91">SPEEDO</a><br />
:: <a href="index.php?main_page=index&cPath=490">AMANZI</a><br />
:: <a href="index.php?main_page=index&cPath=492">BERZELLI</a><br />
:: <a href="index.php?main_page=index&cPath=301">SHAPEWEAR</a><br />
:: <a href="index.php?main_page=index&cPath=310">JETS TAILOR TO SUIT</a><br />
:: <a href="index.php?main_page=index&cPath=275">RIVAL</a><br />
:: <a href="index.php?main_page=index&cPath=219">FIREFLY KAFTANS</a><br />
<BR>
<a href="index.php?main_page=index&cPath=1_8"><strong>BY SWIMWEAR STYLE</strong></a><br />
<img src="images/spacer.gif" height="5" width="100"><br>
:: <a href="index.php?main_page=index&cPath=1_8_136">KAFTANS</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_78">RESORT WEAR</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_126">BRAZILLIAN</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_18">TRIANGLE</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_19">BOOSTER</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_20">TIE SIDE</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_21">BOY LEG</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_22">SINGLET</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_162">PLUS SIZES</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_23">ONE PIECE</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_24">D/DD - E/F CUP</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_25">TUMMY CONTROL</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_26">BOARD SHORTS</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_92">RACING / POOL</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_27">SUN PROTECTION</a><br />
';
}
//BEACHFRONT
if ($current_page=='index' && $cPath=='1_7_157' ) {
$content .= '<img src="images/spacer.gif" height="5" width="100"><br>
<a href="index.php?main_page=index&cPath=1_7"><strong><font color="#006282">BY SWIMWEAR BRAND</font></strong></a><br />
<img src="images/spacer.gif" height="5" width="100"><br>
:: <a href="index.php?main_page=index&cPath=1_7_38">SEAFOLLY</a><br />
:: <a href="index.php?main_page=index&cPath=1_7_13">BAKU</a><br />
:: <a href="index.php?main_page=index&cPath=1_7_15">JETS BY JESSIKA ALLEN</a><br />
:: <a href="index.php?main_page=index&cPath=1_7_103">MIRACLESUIT</a><br />
:: <a href="index.php?main_page=index&cPath=1_7_149">GINJA</a><br />
:: <a href="index.php?main_page=index&cPath=1_7_104">GOTTEX</a><br />
:: <a href="index.php?main_page=index&cPath=1_7_91">SPEEDO</a><br />
:: <a href="index.php?main_page=index&cPath=490">AMANZI</a><br />
:: <a href="index.php?main_page=index&cPath=492">BERZELLI</a><br />
:: <a href="index.php?main_page=index&cPath=301">SHAPEWEAR</a><br />
:: <a href="index.php?main_page=index&cPath=310">JETS TAILOR TO SUIT</a><br />
:: <a href="index.php?main_page=index&cPath=275">RIVAL</a><br />
:: <a href="index.php?main_page=index&cPath=219">FIREFLY KAFTANS</a><br />
<BR>
<a href="index.php?main_page=index&cPath=1_8"><strong>BY SWIMWEAR STYLE</strong></a><br />
<img src="images/spacer.gif" height="5" width="100"><br>
:: <a href="index.php?main_page=index&cPath=1_8_136">KAFTANS</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_78">RESORT WEAR</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_126">BRAZILLIAN</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_18">TRIANGLE</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_19">BOOSTER</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_20">TIE SIDE</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_21">BOY LEG</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_22">SINGLET</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_162">PLUS SIZES</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_23">ONE PIECE</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_24">D/DD - E/F CUP</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_25">TUMMY CONTROL</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_26">BOARD SHORTS</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_92">RACING / POOL</a><br />
:: <a href="index.php?main_page=index&cPath=1_8_27">SUN PROTECTION</a><br />
';
}
$content .= '</div>';
?>
<div class="leftBoxContainer" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="width: <?php echo $column_width; ?>">
<?php echo $content; ?>
</div>
What do i have to do to make this sidebox display globally? I'm at a loss and don't know what to do next.
Thanks in advance.