Jump to content
Sign in to follow this  
jcall

[Contribution] More Category Boxes

Recommended Posts

Have you checked your session configuration in the osC Admin? /tmp is the default location to store your session info - - go to Admin >> Configuration >> Sessions and change the value for Session Directory from the default of /tmp to /tmp2 and see if your error changes.

 

-jared

Share this post


Link to post
Share on other sites
Have you checked your session configuration in the osC Admin? /tmp is the default location to store your session info - - go to Admin >> Configuration >> Sessions and change the value for Session Directory from the default of /tmp to /tmp2 and see if your error changes.

 

-jared

 

Hi Jared,

 

Interesting. This was the error message following the change above:

 

"Fatal error: session_register(): Failed to initialize storage module: user (path: /tmp2) in /public_html/includes/functions/sessions.php on line 77"

 

The code on line 77 is:

return session_register($variable);

 

What do you make of it?

 

By the way, do I need the line of code in more_categories.php that seems to be the cause :

tep_session_register('infoBox');

 

Its just that the More Category Boxes contributing seems to work fine without it.

 

Best,

 

Bob

Share this post


Link to post
Share on other sites

I have a problem with the More Cat. contribution.

 

For some reason the main first category is showing on each box and I am not sure why?

 

Anyone having same problem or a fix?

 

Thanks in advance!

Share this post


Link to post
Share on other sites

Bob - - the infoBox session parameter is only really useful if you have the same category listed in 2 category boxes - - it determines which category one to expand (i.e. the one you clicked in).

 

Dino K -- the way that More Categories determines when to shop showing new categories is when you repeat a category that you've already chosen. For example, if you tell box1 to display cat1, cat2, cat3, cat1, cat1, cat1 (and all the rest cat1), then it will display 1,2,3. If you tell it cat2, cat7, cat9, cat4, cat4, cat4, cat4 (and all the rest cat4) then it will display 2, 7, 9, 4.

 

HTH.

 

-jared

Share this post


Link to post
Share on other sites

Hi Jared,

 

the infoBox session parameter is only really useful if you have the same category listed in 2 category boxes - - it determines which category one to expand (i.e. the one you clicked in).

 

By expand, do you mean display any subcategories in the category box you have clicked in?

 

We don't have any subcategories on our site, so if the above is the case, it is a feature we can live without for the moment.

 

Best,

 

Bob

Share this post


Link to post
Share on other sites

It seems that categories/subcategories work fine in the first new box but not in the second.

I will see if I can work it out. I have checked a few other sites listed here in this topic and they seem fine. At least the ones that have subcategories. I stumbled upon this anomaly trying to enable the category enhancement and at first thought that was the cause. I then reverted to a basic install and that's when I came here. example The domain has nothing to do with the commerce site, just my place to test it. I am not a ie user so I couldn't say if it worked there but I did check firefox, mozilla and epiphany.

<Curt

Share this post


Link to post
Share on other sites

I wiped the store and added your mod again but I can't seem to get the second category to expand the submenus. I thought maybe another mod was effecting it so I deleted everything except the sql database and then started over...

<Curt

Share this post


Link to post
Share on other sites

hello,

 

i have a question,

 

is there any ways to add pictures to the left and the right side of the box? i'm trying to make it look like other the boxes on my website( www.lshealthstore.com ). i've try everything and still no luck getting the left and the rigth line to show up...

 

here is the code i used for my other boxes.. please teach me how to intergrated into this mod.. thank you

 

<tr>
		<td><table width="150" border="0" cellspacing="0" cellpadding="0" align="left">
<TR>
	<TD COLSPAN=3>
		<IMG SRC="images/boxes/review_infoboxtop.gif" WIDTH=120 HEIGHT=12><a href="http://www.lshealthstore.com/products_new.php" border=0><img src="images/boxes/infoboxtoparrow.gif" width=30 border=0></a></TD>
</TR>
<TR>
<td><IMG SRC="images/boxes/infoboxleft.gif" WIDTH=1 HEIGHT=100%></td><td>

PHP CODES HERE

</td><td background="images/boxes/infoboxright.gif" WIDTH="13" HEIGHT="100%"></td>
 </tr><tr><TD COLSPAN=3>
		<IMG SRC="images/boxes/infoboxbottom.gif" WIDTH=150 HEIGHT=6></TD>
</TR>
</table>

Share this post


Link to post
Share on other sites

Well, I would like to say that I figured out why it wasn't working, but...

I ran several different debugging scenarios and finally ended up making a new installation and rar'ed in the more category boxes mod (*-50.sql incl.) then sql'ed in just categories, categories_descriptions, more_categories, products, product_descriptions and products_to_categories from my original install. Now it is working as it should. After two days screwing with it I really wanted to figure out the root cause but I guess the old saying goes ' alls well that ends well'.

<Curt

Share this post


Link to post
Share on other sites

@Curt - sorry I couldn't help sooner, glad you got it working.

 

@david - looks like you are on the right track. You need essentially this:

<td><IMG SRC="images/boxes/infoboxleft.gif" WIDTH=1 HEIGHT=100%></td>

<td> MORE CATEGORY BOX

<td><IMG SRC="images/boxes/infoboxleft.gif" WIDTH=1 HEIGHT=100%></td>

 

-jared

Share this post


Link to post
Share on other sites
@Curt - sorry I couldn't help sooner, glad you got it working.

 

@david - looks like you are on the right track. You need essentially this:

<td><IMG SRC="images/boxes/infoboxleft.gif" WIDTH=1 HEIGHT=100%></td>

<td> MORE CATEGORY BOX

<td><IMG SRC="images/boxes/infoboxleft.gif" WIDTH=1 HEIGHT=100%></td>

 

-jared

 

 

thanx for the reply, but.. where in the more_categories.php do i put those code in to make it work?

Share this post


Link to post
Share on other sites

I think I stumbled upon the answer. You know these things will just bug a person until they figure it out. There is an option in admin for 'Use Search-Engine Safe URLs (still in development)' and when this is set to true only one box will work with the expanding of subcategories. Interestingly, it is the first box that you would click a category in. For example, I clear the cache and reload the catalog with option true for safe url, and click in box1 on a category everything works fine in box1 but box2 subgategories will not show. If i do exactly the same thing (with cache and reload) and click box2 category first, then subcategories in box1 will not expand. If I change the option to false categories behave as they should.

Share this post


Link to post
Share on other sites

What A WONDERFUL Contribution to the Community.

 

Let me first give my thanks....

 

THANK YOU!

 

Now secondly, I am having a small problem.

 

The one I installed seems to be the one with images on the left (which is fine with me),

 

however on my site it is only displaying the first image.

 

Ex.

 

workingimage (category name)

non-workingimage (sub-categoryname)

workingimage (next category name)

non-workingimage (next sub-categoryname)

non-workingimage (next sub-categoryname)

 

etc....

 

for a more detailed view you can go here

 

https://www.chorra-bhan.ca

 

You can click on Cases Category OR CPU category to see what I mean....

 

Please disregard all other non-working images as I know they do not work (there's no images in place yet)

 

ANY Help would be appreciated....

 

Thanks,

 

CBTC

Edited by ChorraBhan

Share this post


Link to post
Share on other sites

Hi, great contribution

 

got it all working, works fine with STS.

 

Just have 1 question.

 

Is it possible to put an image in the box headers ? so its a background image where the writing can sit on it.

 

 

 

 

Thanks

Tom hayes

Share this post


Link to post
Share on other sites
Just one think want to know, about the different language (i am using 3 language).

 

I'd like to have the different names (with 3 language) for the box, but there is only one line for the box name.

 

 

I searching about a multi language solution too

i have more boxe categories installed, but now i want add 2 new languages

 

what can i do that the boxe title is multi language ???

 

Please help

Share this post


Link to post
Share on other sites

Hi -

 

I installed your contribution and everything seemed to be working fine until I viewed the actual catalog.

 

The categories show up but the seperate boxes that are supposed to seperate the categories dont. I don't know what's going on or how to fix. Could it be because I'm using a template?

 

Here's how I want it to be set up:

 

Mens Box

=========

Premium Tees

Basic Tees

Long Sleeve

Collared Shirts

=========

 

Womens Box

=========

Tanks

Skirts

Crops

=========

 

Here's how it is setup now: http://www.tcclothing.com/shop/

 

Any help would be greatly appreciated! Thanks!

 

Ryan

Share this post


Link to post
Share on other sites

I have this contribution installed and it is working great, except for one problem. I have the infobox portion of the URL removed as you suggested:

 

 $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">'; // CategoryBox Enhancement
//$categories_string .= tep_href_link(FILENAME_DEFAULT, 'infoBox=' . $boxId . '&' . $cPath_new) . '">';

 

However when I used this category string rathern than the one with the infobox part in it, I notice that my subcategories won't display when I've clicked on a category that has them. I don't have my categories included in more than one infobox so it should be clear which one needs to open. Is there someway not to use the URL with the "infobox=" part in it and also have the subcategories show up in the left hand navigation when their parent category is opened?

 

Thanks,

Ashley

Share this post


Link to post
Share on other sites
More Category Boxes 1.0

June 29, 2005

Author: Jared Call

Dignified Contributor: Gregory Baboolal (devosc)

 

This contribution can be downloaded from: http://www.oscommerce.com/community/contributions,3327

What this contrib does:

========================

This contribution adds the following features:

- Add up to 10 additional category boxes to the left column, each of which can contain up to 25 admin-selectable top level categories.

- Each new category box may be enabled/disabled.

- The default categories box may be enabled/disabled.

- Each new category box has a customizable name (infobox heading).

 

Caveats / Known Issues:

=======================

- Each category box is updated independently in admin. When you click the "update" button, you are updating that box ONLY.

- You may only select parent categories to display at top level in each infobox (i.e. this contrib does not alter the standard osCommerce category tree structure).

- This contribution does not yet support apostrophes in infobox names.

- Categories still follow the same sorting order specified in the osCommerce Admin >> Catalog >> Categories/Products

 

NOTE: The customer for whom this was written wanted to use up to 50 categories per category box. If you want to do this, use the files with -50 in the name. For example, instead of using more_categories.php, rename more_categories-50.php to more_categories.php and use that one instead.

 

NOTE2: The includes/boxes/more_categories-50.php file also includes the CategoriesBox Enhancement contribution code. It should be easy enough, with a diff utility (Beyond Compare, WinMerge, CompareIt, WinDiff, etc) to see the differences between the includes/boxes/more_categories.php and includes/boxes/more_categories-50.php.

 

(all of this and more is in the readme.txt in the contrib download)

Share this post


Link to post
Share on other sites

Hi,

 

Using this contribution, does anyone know how to hardcode a hyperlink to another page within the more_categories.php file?

 

What I am trying to achieve using this contribution, is to manually code in 3 hyperlinks to sub-category pages under ONE category in the Category Menu Box.

 

So it would look something similar to this:

 

CATEGORY ONE LINK

- subcategory hyperlink a

- subcategory hyperlink b

- subcategory hyperlink c

CATEGORY TWO LINK

CATEGORY THREE LINK

CATEGORY FOUR LINK

 

 

Rachel

Share this post


Link to post
Share on other sites

Hi,

 

Using this contribution, does anyone know how to hardcode a hyperlink to another page within the more_categories.php file?

 

What I am trying to achieve using this contribution, is to manually code in 3 hyperlinks to sub-category pages under ONE category in the Category Menu Box.

 

So it would look something similar to this:

 

CATEGORY ONE LINK

- subcategory hyperlink a

- subcategory hyperlink b

- subcategory hyperlink c

CATEGORY TWO LINK

CATEGORY THREE LINK

CATEGORY FOUR LINK

 

 

Rachel

Share this post


Link to post
Share on other sites

Hi Jared,

 

I am trying to add the more categories to a store that uses the multi stores contrib and to be quite honest I am stuck at the first hurdle - the dreaded query

 

This is the query from the multi stores categories box

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_CATEGORIES_TO_STORES . " c2s where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and c.categories_id = c2s.categories_id and c2s.stores_id = '" . STORES_ID . "' and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

 

And this is the query from the more categories file

 

	$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id in (".implode(',',$infoBox['categories']).") and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

 

Every time I try to combine the multi stores part of the query with the more categories query I end up with all sorts of MYSQL errors.

 

Any chance you could help resolve this for me because I find the more categories and invaluable addition to any store with lots a categories.

 

Thanks

 

Mark


Lifes a bitch, then you marry one, then you die!

Share this post


Link to post
Share on other sites

Hi Jared,

 

I managed to get my last post sorted out and the more catagories is now working well with the multistores contrib.

 

I am trying to expand on the idea talked about earlier in the thread about having different color backgrounds for each infobox header. Now I have already done with images on one site but this time I after doing it with the stylesheet.

 

This is what I have so far:

 

if ($i == 0) {

 $info_box_contents = array();
 $info_box_contents[] = array('text' => $infoBox['name']);

 new infoBoxHeading_red($info_box_contents, true, false);

 

The different background colors showing fine, the problem lies in the infobox name, the code above displays the more categories box number ie 0, 1, 2 etc.

 

What is the correct code for pulling in the box name because I have tried all sorts of things and nothing I do works :blink:

 

Any help you can give would be greatly appreciated.

 

Thanks

 

Mark


Lifes a bitch, then you marry one, then you die!

Share this post


Link to post
Share on other sites

This might be a stupid question - but I have installed everything up to step 8, but how do I add this contribution to the database?

 

It says:

 

Execute/import the MySQL commands in more_categories.sql using phpMyAdmin, the mysql command line, or any other worthy MySQL administration tool.

 

And I'm in phpMyAdmin, but have no idea what to type in!

 

Any help?

Share this post


Link to post
Share on other sites

Thankyou Jcall for this great contribution! My site looks so much more organized with less clicking going on! Always a good thing :)

 

I have read through the thread (very small... B) ) but haven't come across anyone else with the display that I am seeing on my site. Maybe no one has 2 child levels in their menus :o

 

My second child level is not indenting at all, but remains in the same position as it's parent. Do you know why this might be?

 

Look forward to your post (or if anyone else has an idea of a fix I would love to hear it :thumbsup: )

Sheri

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×