Forums / Templates, Stylesheets, Page Layout / Eliminate right column on ALL Product Category Listing pages

Eliminate right column on ALL Product Category Listing pages

Started by lindenboy on 6 Apr 2011, 3:25 PM · Views: 1,177

Results 1 to 4 of 4
6 Apr 2011, 3:25 PM
#1
lindenboy avatar

lindenboy

New Zenner

Join Date:
Feb 2011
Location:
Indianapolis, IN
Posts:
38
Plugin Contributions:
0

Eliminate right column on ALL Product Category Listing pages

Is there a wildcard one can use to eliminate the right column on all PRODUCT CATEGORY listings? My right column is generally fun stuff, like best sellers, a facebook widget and a google calendar widget -- things that don't need to reload necessarily and take up bandwidth while folks are "shopping."

I have researched the tpl_main_page.php edits, and have appropriately edited my template override to accommodate removing the right column on checkout pages as well as the product_info pages, but it seems that to do this for catgories I have to insert EVERY category individually such as:


if (in_array($current_page_base,explode(",",'checkout_shipping,checkout_payment,checkout_confirmation,product_info')) ) {
$flag_disable_right = true;
}

if (in_array($cPath,explode(",",'7,5,3,25,6,24,33,20,34')) ) {
$flag_disable_right = true;
}

Is there a wildcard or some notation which would tell the page to incorporate all CATEGORY ids, as opposed to ALL IDs which would presumably include products -- I guess this would work too and I could eliminate the "product_info" reference:


if (in_array($current_page_base,explode(",",'checkout_shipping,checkout_payment,checkout_confirmation,product_info,WILDCARD')) ) {
$flag_disable_right = true;
}

if (in_array($cPath,explode(",",'WILDCARD')) ) {
$flag_disable_right = true;
}

TIA.

JJ
http://www.tuxedoparkbrewers.com/
ZenCart 1.3.9h (Current)

6 Apr 2011, 4:58 PM
#2
lindenboy avatar

lindenboy

New Zenner

Join Date:
Feb 2011
Location:
Indianapolis, IN
Posts:
38
Plugin Contributions:
0

Re: Eliminate right column on ALL Product Category Listing pages

Perhaps I can simply the request or clear it up: I would like for the right column to disappear on every product / catgegory page AFTER some begins "shopping" from the categories menu (or alternatively arrives at a product or category page from a link or search box).

The more I look into it, the more I feel like there may be a global option to turn off the columns from an admin setting, because excepting EVERY category using the tpl_main_page.php code seems a bit clunky for what I want to do.

TIA!

JJ

6 Apr 2011, 6:44 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Eliminate right column on ALL Product Category Listing pages

if (in_array($current_page_base,explode(",",'checkout_shipping,checkout_payment,checkout_confirmation,product_info')) ) {
$flag_disable_right = true;
}

if ($current_page_base == 'index' and $_GET['cPath'] != '' ) {
$flag_disable_right = true;
}
``````php
if ((in_array($current_page_base,explode(",",'checkout_shipping,checkout_payment,checkout_confirmation,product_info'))) or ($current_page_base == 'index' and $_GET['cPath'] != '' )) {
$flag_disable_right = true;
}
6 Apr 2011, 9:35 PM
#4
lindenboy avatar

lindenboy

New Zenner

Join Date:
Feb 2011
Location:
Indianapolis, IN
Posts:
38
Plugin Contributions:
0

Re: Eliminate right column on ALL Product Category Listing pages

Beautiful! Obviously PHP isn't my strong suit : )

Funny part too is that I searched the forum again to find the original code (for a different purpose) and found a different answer (probably one that worked). I will cross post both:

http://www.zen-cart.com/forum/showthread.php?t=164837

Nonetheless, TYVM!

JJ