Zen Cart Logo
Forums / Basic Configuration / Need SideBox to show in One Catagory Only

Need SideBox to show in One Catagory Only

Locked

Views: 7,335

Results 21 to 32 of 32
This thread is locked. New replies are disabled.
22 Feb 2009, 9:12 PM
#21
ajeh avatar

ajeh

Oba-san

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

Need SideBox to show in One Catagory Only

What are the real filenames used for FILE 1, FILE 2 and FILE 3? :unsure:

22 Feb 2009, 9:23 PM
#22
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Need SideBox to show in One Catagory Only

Sorry........

FILE1: dynamic_categories_sidebox_defines.php
FILE2: dynamic_categories_sidebox.php
FILE3: tpl_dynamic_categories_sidebox.php

22 Feb 2009, 10:00 PM
#23
ajeh avatar

ajeh

Oba-san

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

Re: Need SideBox to show in One Catagory Only

After loading these files, did you then go to the Tools ... Layout Boxes Controller ... and turn on the sidebox?

22 Feb 2009, 10:31 PM
#24
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Need SideBox to show in One Catagory Only

Yes, the box works perfectly well with the code that's in place... that's not the problem :-)

the problem is how to get a specific category to appear in the contents of the box... here, like this:

When I click on the Childrenswear||Coats & Jackets category circled, it makes the new sidebox appear (Kids Jackets).

Now, these size categories (Age 4-5 etc.) are generated by the HTML code linking to these category URL's (input HTML coe between the apostrophes in FILE1).

The problem is that they will always appear there, even if they are not active categories (empty categories).

I am looking for a way to make the Age 4-5 etc., categories appear only when the categories are active.... probably by using PHP code to generate/poplulate the menu instead of HTML

Now you see why it's maybe beyond my capabilities?

23 Feb 2009, 1:22 AM
#25
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Need SideBox to show in One Catagory Only

If the above is a bit too tricky then I can live without it for now... thanks for all your time though...

23 Feb 2009, 4:03 PM
#26
ajeh avatar

ajeh

Oba-san

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

Re: Need SideBox to show in One Catagory Only

This code would make a link for SOME NAME to with the cPath set to 1_8 ...

  $content .= '<h1>' . TEXT_DYNAMIC_CATEGORIES_SIDEBOX . '</h1>';
  $content .= '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . '1_8') . '">' . 'SOME NAME' . '</a> ';
16 Mar 2009, 7:58 AM
#27
jerry5763837 avatar

jerry5763837

Zen Follower

Join Date:
May 2008
Posts:
261
Plugin Contributions:
0

Re: Need SideBox to show in One Catagory Only

hi, Linda,

Could you please also help to check my problem:D

I just want to enable or disable certain sidebox (not whole left or right column)for certain pages,
for example, want to enable **subscribe sidebox **on contact_us page

what i can do to achieve this? your suggestion would be highly appreciated. thanks.:clap:

16 Mar 2009, 9:46 AM
#28
divos avatar

divos

New Zenner

Join Date:
Mar 2009
Posts:
4
Plugin Contributions:
0

Re: Need SideBox to show in One Catagory Only

Hi , I wanted a sidebox to show only in main page , kinda sorted out with show categoryID=0 , it doesn't show on other categories and products but still shows in conditions , privacy , contact pages , any advice ?

16 Mar 2009, 12:36 PM
#29
divos avatar

divos

New Zenner

Join Date:
Mar 2009
Posts:
4
Plugin Contributions:
0

Re: Need SideBox to show in One Catagory Only

Problem solved by adding manually each page (login , logoff , contact , privacy etc) that I do not want to display the sidebox , maybe not the most elegant solution but it works .

16 Mar 2009, 1:23 PM
#30
gjh42 avatar

gjh42

Black Belt

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

Re: Need SideBox to show in One Catagory Only

You can use ```php
if ($this_is_home_page) {
//your code
}

16 Mar 2009, 3:14 PM
#31
ajeh avatar

ajeh

Oba-san

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

Re: Need SideBox to show in One Catagory Only

Jerry5763837:

hi, Linda,

Could you please also help to check my problem:D

I just want to enable or disable certain sidebox (not whole left or right column)for certain pages,
for example, want to enable **subscribe sidebox **on contact_us page

what i can do to achieve this? your suggestion would be highly appreciated. thanks.:clap:

Look at how the tell_a_friend sidebox is done where it says to not show on the tell a friend page ...

    if (!($_GET['main_page']==FILENAME_TELL_A_FRIEND)) $show_tell_a_friend = true;

You can do something similar by adding a code like this to that sidebox ...

I have not used that so you will kind of have to wing it ... but that example may help you using something like:

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

Then look at how the if surrounds the code as to whether or not it runs ...

16 Mar 2009, 6:30 PM
#32
divos avatar

divos

New Zenner

Join Date:
Mar 2009
Posts:
4
Plugin Contributions:
0

Re: Need SideBox to show in One Catagory Only

Thank you Glenn , works great .