It hide the side box on product page, but also hides footer, banners, everything else from where side box was down.
It hide the side box on product page, but also hides footer, banners, everything else from where side box was down.
<insert dancing here> ...![]()
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Great topic, exactly what I am looking for
I hope you can help me with this:
1. I would like to hide categories and chcategories (Categories Dressing) sideboxes on these two pages/links
/index.php?main_page=contact_us
/index.php?main_page=news_archiv
2. Also, I need to hide standard categories sidebox in these categories (cPaths)
index.php?main_page=index&cPath=148
index.php?main_page=index&cPath=146
I am not sure is this possible to do with css trick as Kuroi mentioned on first page, or editing 'common/tpl_main_page.php' and how?
Thnx in advance, all suggestions are welcome![]()
It would be similar where you can setup an IF around the code, if it doesn't exist already and the $show_my_sidebox would be whatever variable you are using in that sidebox ...
For the cPath you can use:Code:if ($_GET['main_page']=='contact_us' or $_GET['main_page']=='news_archiv') { $show_my_sidebox = false; }
$_GET['cPath']
For the current categories_id you can use:
$current_category_id
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
huhas I am still new zenner I dont now where to start: where should I insert this code? I assume it need sto be inserted in '/templates/mytemplate/common/tpl_main_page.php'? I tryed to set this code in tpl_main_page.php
exactly bellow this part of ocde:Code:if ($_GET['main_page']=='contact_us' or $_GET['main_page']=='news_archiv') { $show_my_sidebox = false; }
looking like thisCode:the following IF statement can be duplicated/modified as needed to set additional flags if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) { $flag_disable_right = true; }
but nothing happens. Also I tryed replacing "$show_my_sidebox = false;" with "$show_categories = false;" but still nothing changes..Code:the following IF statement can be duplicated/modified as needed to set additional flags if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) { $flag_disable_right = true; } if ($_GET['main_page']=='contact_us' or $_GET['main_page']=='news_archiv') { $show_my_sidebox = false; }
This code is designed for the individual sideboxes ...
If you look at how the specials sidebox is done in the:
/includes/modules/sideboxes/specials.php
This sidebox uses:Code:// test if box should display $show_specials= false; if (isset($_GET['products_id'])) { $show_specials= false; } else { $show_specials= true; } if ($show_specials == true) { // all the code that makes the box here } }
$show_specials
because it matches the sidebox name ... it could use $fred but that wouldn't make sense for easy coding ...
The idea is, there are conditions set as to when the variable:
$show_specials is true or false
The IF around all of the code for:
if ($show_specials == true) {
makes this sidebox show or not show when the various conditions are true ...
For any sidebox, the same logic can be built ...
1 you need the logical tests for when to show or not show a sidebox
2 the code that makes the sidebox display must be surrounded by an IF statement such as:
Code:if ($show_specials == true) { // all the code that makes the box here }
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
In this case, both #categories and #chcategories use the same template file (tpl_categories.php) - that's the way fragfutter set it up for chcategories, and it conveniently worked with Categories Dressing.
You can control the sideboxes separately by using the test in the module files. In /includes/modules/sideboxes/your_template/ch_categories.php, find this:and add above itPHP Code://CHRISTOPH BOF
require_once (DIR_WS_CLASSES . 'ch_categories_tree_generator.php');
and at the bottom of the file just before the ?>, add } to getPHP Code:$show_chcategories = true;
if ($_GET['main_page']=='contact_us' or $_GET['main_page']=='news_archiv') {
$show_chcategories = false;
}
if ($show_chcategories){
Do the same kind of thing in /includes/modules/sideboxes/your_template/categories.php, to getPHP Code:}?>
andPHP Code:$show_categories = true;
if ($_GET['main_page']=='contact_us' or $_GET['main_page']=='news_archiv' or (int)$_GET['cPath']=='146' or (int)$_GET['cPath']=='148') {
$show_categories = false;
}
if ($show_categories){
$main_category_tree = new category_tree;
$row = 0;
PHP Code:}?>
Last edited by gjh42; 7 Feb 2010 at 09:32 PM.
@Ajeh
thnx for detail explanation, it helped me better understand how sideboxes based on page working
as always Glenn, your code works like charmThanks man
also now I understand this code better how it exactly works so I tryed this code on other two additional sideboxes I have on my site (custom Blank sidebox from author Kuroi) and its all working great![]()
Hi all,
Noob here.
Exhaustively read entire thread and did not see an answer to the following question...
How do I keep the manufacturer_info side box from disappearing when listing a manufacturer's products?
ie. /index.php?main_page=index&manufacturers_id=8
Doesn't make sense to show manufacturer_info box when all a manufacturer's products are displayed?
Take a look at the site:
sidebox missing from specific manufacturer product list
http://www.regionalmarketplace.us/ca...facturers_id=8
individual products show sidebox:
http://www.regionalmarketplace.us/ca...roducts_id=181
Any help is greatly appreciated.