Zen Cart Logo
Forums / General Questions / Catagories sidebox showing multiple times

Catagories sidebox showing multiple times

Locked

Views: 1,230

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
9 Feb 2010, 9:05 PM
#1
alteredvision avatar

alteredvision

New Zenner

Join Date:
Feb 2010
Posts:
41
Plugin Contributions:
0

Catagories sidebox showing multiple times

Version: 1.3.8
Upgrade: Database Patch Level: 1.3.8
Addons/Mods:

  • clickshowhide_category_menu_1-1
  • ch_category
  • categories_dressing_2-7-3
  • categories_menu__replace_with_ulli_0-9
  • categories_menu_yahootreemenu_with_ajax_0-9
  • display_categories_in_separate_boxes_1-0

Site URL: local development site so no link can be given

After trying several times to get the categories sidebox to not be the fold out tree thing and installing all the stuff listed above and also trying some of the direct code mods that I have found in the forum, shockingly enough I now have issues with my template. When I change to the default template there is no issues so it must be in my template files but I have put all the ones from the green template into mine and nothing seems to get rid of the multiple times that a categories box shows up on my site.

9 Feb 2010, 9:20 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Catagories sidebox showing multiple times

If you have the ch_categories files installed, you have a sidebox for it listed in Tools > Layout Boxes Controller. You need to turn that off to get rid of its display. Some of the other mods probably also have their own module files to turn off there. It's generally best to actually delete files that you are sure you are not going to use; in some folders, files are autoloaded whether you intend to use them or not.

9 Feb 2010, 9:42 PM
#3
alteredvision avatar

alteredvision

New Zenner

Join Date:
Feb 2010
Posts:
41
Plugin Contributions:
0

Re: Catagories sidebox showing multiple times

All that stuff is turned off in the system.

I have started a new template thinking that maybe that will fix it and the problem is on all templates now not on just one as stated previously.

Do you know the file that I would replace to get it back to just normal for the side display?

Is there a way to reinstall it or do I just delete the main ZenCart folder and start all over?

9 Feb 2010, 10:14 PM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Catagories sidebox showing multiple times

There is not just one file responsible for the sidebar display. column_left.php coordinates it for the left side, but others are also necessary and more likely to be the source of problems.
If some of the core files have been altered, and the database modified in any way, it may be safer to start fresh.

12 Feb 2010, 3:51 AM
#5
alteredvision avatar

alteredvision

New Zenner

Join Date:
Feb 2010
Posts:
41
Plugin Contributions:
0

Re: Catagories sidebox showing multiple times

After re-installing and re doing the whole template, the same issue showed up again even though I did not install any mods yet.

I found out what the issue is, in another post about a different topic it shows that you can display sideBoxes on just the home page if you want by adding this code:

if ($this_is_home_page) {
    $show_gallery = true;
  } else {
    $show_gallery = false
  };

This code works perfectly, except that when not on the home page the next sideBox under this one will get duplicated because the if statement in the above code does not do anything if it is not on the home page. I do not know why the system needs the added code but it works fine now for me.

Code that I use now that seems to fix the duplication problem.

if ($this_is_home_page) {
    $show_gallery = true;
  } else {
    $show_gallery = false;
	$content='';
  };
12 Feb 2010, 3:42 PM
#6
gjh42 avatar

gjh42

Black Belt

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

Re: Catagories sidebox showing multiple times

Every sidebox module code OR tpl code, whichever one starts building the box content, should start with a $content = ''; line. It does seem odd that the next sidebox should be duplicated instead of the previous box added to the next box's code; I would have to see the files for all of the boxes involved to be sure what was happening.

14 Feb 2010, 3:24 AM
#7
alteredvision avatar

alteredvision

New Zenner

Join Date:
Feb 2010
Posts:
41
Plugin Contributions:
0

Re: Catagories sidebox showing multiple times

Here is something odd that I found. The gallery box that I use has a table in it that has images displayed and it seems to be the root of my problems. It seems that the sideboxes do not like table tags.

If you just add in a custom sidebox and put in a table tag in breaks the zen cart code and puts this in a td tag next to the other one making the main page content go on top of the sidebox table.

Here is the code for my sidebox:

if ($this_is_home_page) {
    $show_gallery = true;
  } else {
    $show_gallery = false;
	$content='';
  };
if ($show_gallery == true){
   $content='<table><tr><td>Cell main table</td><tr><tr><td><table><tr><td>Table inside new cell</td></tr></table></td></tr></table>';
 };
14 Feb 2010, 3:35 AM
#8
alteredvision avatar

alteredvision

New Zenner

Join Date:
Feb 2010
Posts:
41
Plugin Contributions:
0

Re: Catagories sidebox showing multiple times

It is also strange that there is a table right above that one and it has no issues and when I remove it nothing happens to the below table.

14 Feb 2010, 3:54 AM
#9
alteredvision avatar

alteredvision

New Zenner

Join Date:
Feb 2010
Posts:
41
Plugin Contributions:
0

Re: Catagories sidebox showing multiple times

If I put this same exact code below the side banner it works fine though it just can not be above that or it cause issues.

14 Feb 2010, 4:51 AM
#10
ajeh avatar

ajeh

Oba-san

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

Re: Catagories sidebox showing multiple times

Can you move this line above the IF statements:
$content='';

14 Feb 2010, 6:26 AM
#11
alteredvision avatar

alteredvision

New Zenner

Join Date:
Feb 2010
Posts:
41
Plugin Contributions:
0

Re: Catagories sidebox showing multiple times

Did that it still puts it over to the side of the first SideBox.I guess I am going to have to go to div tags.

16 Feb 2010, 5:19 AM
#12
gjh42 avatar

gjh42

Black Belt

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

Re: Catagories sidebox showing multiple times

In most cases HTML tables are inappropriate for page layout anyway. They give a false message about the content.

I noticed an incorrect tag in what you posted; don't know if it was the same in your actual file.```

<table><tr><td>Cell main table</td><tr><tr><td><table><tr><td>Table inside new cell</td></tr></table></td></tr></table> ```Not to mention that you omitted the <tbody> tags, but I guess browsers know to make up for those.