Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / how to remove category box from just one page?

how to remove category box from just one page?

Locked

Views: 2,410

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
3 Apr 2008, 5:35 AM
#1
noneya99 avatar

noneya99

New Zenner

Join Date:
May 2004
Location:
Nathalie,Virginia
Posts:
78
Plugin Contributions:
0

how to remove category box from just one page?

I have define page 2 turned on but I want to remove the category box from the page is it possible?

I tried using the ideas offered here http://www.zen-cart.com/forum/showthread.php?t=53574

and changing the "index" to "page2" but it's not working (it's didn't work when i used index either)

however if i used the suggestion in post #7 of the above referenced thread if ($this_is_home_page) {

then it worked BUT i need it for page 2 not the home page .. can anyone tell me what to change the "this is home page" to read so that it works on the page 2? also i just want to remove the boxes I don't want the center text to move over to the left side as it did

here is the site link if you should need it
https://www.gourmet-foods-inc.com (page2 is the one under more info named certified organic/all natural)

Thank you,
Noneya

3 Apr 2008, 5:50 AM
#2
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,179
Plugin Contributions:
0

Re: how to remove category box from just one page?

Noneya99:

I have define page 2 turned on but I want to remove the category box from the page is it possible?

I tried using the ideas offered here http://www.zen-cart.com/forum/showthread.php?t=53574

and changing the "index" to "page2" but it's not working (it's didn't work when i used index either)

however if i used the suggestion in post #7 of the above referenced thread if ($this_is_home_page) {

then it worked BUT i need it for page 2 not the home page .. can anyone tell me what to change the "this is home page" to read so that it works on the page 2? also i just want to remove the boxes I don't want the center text to move over to the left side as it did

here is the site link if you should need it
www.gourmet-foods-inc.com (page2 is the one under more info named certified organic/all natural)

Thank you,
Noneya

Take time to read this tutorial..

https://www.zen-cart.com/tutorials/index.php?article=249

3 Apr 2008, 12:04 PM
#3
noneya99 avatar

noneya99

New Zenner

Join Date:
May 2004
Location:
Nathalie,Virginia
Posts:
78
Plugin Contributions:
0

Re: how to remove category box from just one page?

well apparently some sleep helped.. i just realized the code wasn't working from the other thread b/c i was putting "page2" and not "page_2"

now i have to figure out away to stop it from shifting left when the column is turned off

3 Nov 2008, 7:32 PM
#4
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Re: how to remove category box from just one page?

haredo:

Take time to read this tutorial..

https://www.zen-cart.com/tutorials/index.php?article=249

I looked at this tutorial, but I didn't see how I would set it up so the category sidebox would not show up on the checkout_shipping page.

3 Nov 2008, 8:04 PM
#5
ajeh avatar

ajeh

Oba-san

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

Re: how to remove category box from just one page?

You could customize the categories sidebox by customizing the module to have something like this:

if ($_GET['main_page'] == FILENAME_CHECKOUT_SHIPPING) {
  $show_categories_box = false;
} else {
  $show_categories_box = true;
}

  if ($show_categories_box) {
    $main_category_tree = new category_tree;
    $row = 0;
    $box_categories_array = array();

// don't build a tree when no categories
    $check_categories = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_status=1 limit 1");
    if ($check_categories->RecordCount() > 0) {
      $box_categories_array = $main_category_tree->zen_category_tree();
    }

    require($template->get_template_dir('tpl_categories.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_categories.php');

    $title = BOX_HEADING_CATEGORIES;
    $title_link = false;

    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
  }
4 Nov 2008, 3:54 AM
#6
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Re: how to remove category box from just one page?

What would I do if I want to do this to more than one page? (checkout_shipping, checkout_payment, and checkout_confirmation)

4 Nov 2008, 4:04 AM
#7
gjh42 avatar

gjh42

Black Belt

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

Re: how to remove category box from just one page?

if ($_GET['main_page'] == FILENAME_CHECKOUT_SHIPPING or $_GET['main_page'] == FILENAME_CHECKOUT_PAYMENT or $_GET['main_page'] == FILENAME_CHECKOUT_CONFIRMATION ) {
4 Nov 2008, 2:46 PM
#8
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Re: how to remove category box from just one page?

Thank you for your help. That worked great.

6 Jun 2009, 5:18 AM
#9
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Re: how to remove category box from just one page?

What would I do if I want the reverse? I want a side box to only show up on certain pages.

6 Jun 2009, 11:54 AM
#10
ajeh avatar

ajeh

Oba-san

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

Re: how to remove category box from just one page?

Same thing but switch the true and false around ... :smile: