Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Disabling all of Sideboxes except..

Disabling all of Sideboxes except..

Views: 555

Results 1 to 6 of 6
26 Jun 2011, 3:01 AM
#1
nolsowski avatar

nolsowski

Inactive

Join Date:
Aug 2010
Posts:
324
Plugin Contributions:
0

Disabling all of Sideboxes except..

I want to disable all of the left sideboxes except on the product description page.

Is there a way to do that?

I did figure out how to do the homepage but I can't seem to figure out the rest.

Test site is (in case you need it) http://frompropertorocker.com/fptrtest/index.php?main_page=index

Thanks!

26 Jun 2011, 3:44 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Disabling all of Sideboxes except..

You could customize, using your templates and overrides, the file:
/includes/templates/your_template_dir/common/tpl_main_page.php

Around line 100, change the code to read:

if ([B]in_array($current_page_base,explode(",",'product_info'))  || (COLUMN_LEFT_STATUS == 0 || [/B](CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')))[B])[/B] {
26 Jun 2011, 4:20 AM
#3
nolsowski avatar

nolsowski

Inactive

Join Date:
Aug 2010
Posts:
324
Plugin Contributions:
0

Re: Disabling all of Sideboxes except..

Ajeh:

You could customize, using your templates and overrides, the file:
/includes/templates/your_template_dir/common/tpl_main_page.php

Around line 100, change the code to read:

if ([B]in_array($current_page_base,explode(",",'product_info')) || (COLUMN_LEFT_STATUS == 0 || [/B](CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')))[B])[/B] {


Thank you! But this only turned off the product description page. I want to keep it on the product description page and delete it every where else.

Is there a way to do that?
26 Jun 2011, 5:04 AM
#4
nolsowski avatar

nolsowski

Inactive

Join Date:
Aug 2010
Posts:
324
Plugin Contributions:
0

Re: Disabling all of Sideboxes except..

Okay I think I am getting it. I found this topic on it http://www.zen-cart.com/forum/showthread.php?t=137035 and did what post #4 said. But I am having a problem. I got the product listing off but now it's also taking off the product description.

Here is the code I put in ```php
if (in_array($cPath,explode(",",'1,1_2')) ) {
$flag_disable_left = true;
}


My first product listing ends with this cPath=1

and my second product listing ends with this cPath=1_2

and the product description says this cPath=1_2&products_id=1

How do I keep the sidebox on the product description page?

Sorry if I confused you and thanks for the help!
26 Jun 2011, 1:34 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Disabling all of Sideboxes except..

Then you might try reversing it:

if (!in_array($current_page_base,explode(",",'product_info'))  || (COLUMN_LEFT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')))) {
26 Jun 2011, 2:50 PM
#6
nolsowski avatar

nolsowski

Inactive

Join Date:
Aug 2010
Posts:
324
Plugin Contributions:
0

Re: Disabling all of Sideboxes except..

Ajeh:

Then you might try reversing it:

if (!in_array($current_page_base,explode(",",'product_info')) || (COLUMN_LEFT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')))) {


:clap: Thanks a bunch!! It's exactly how I want it now.