Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] More Category Boxes


Guest

Recommended Posts

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.

Link to comment
Share on other sites

Hey all... i solved all the problems i had on adding this to my site. However, I am still getting the image error boxes next to all the categories. Can someone help me understand what i possible lost. I commented out the IMAGE references previously suggested.

 

this is my site here

 

 

Thanks,

 

irish

Link to comment
Share on other sites

the "more category boxes" contribution seemt very promising so I dowloaded it and started following the read me file.

 

Im trying to add a new catogory box to my site structure under the blast she image for girl clothes.

here is the website http://www.blaststore.com/test

 

I exactly did what it told me and came to the 8th step where it tells to Execute/import the MySQL commands in more_categories.sql using phpMyAdmin.

 

This has been my first time editing a database and I thought I almost managed it.. but pittly i did not!

the first time I went to my admim page, I saw the more categories button under the catalog section and I got very exited, i pressed "enable default category box?" (which for some reason became BOX_CATALOG_MORE_CATEGORIES in another admin window I opened ) when I give a new name to the box and select a category say both yes/no to category box enabled and update it I come up with this warning

 

1054 - Unknown column 'category3_id' in 'field list'

 

update categories_more set infobox_name = 'box1', enabled = '0', category1_id = '64', category2_id = '64', category3_id = '64', category4_id = '64', category5_id = '64', category6_id = '48', category7_id = '64', category8_id = '64', category9_id = '64', category10_id = '64' , category11_id = '64', category12_id = '64', category13_id = '64', category14_id = '64', category15_id = '64', category16_id = '64', category17_id = '64', category18_id = '64', category19_id = '64', category20_id = '64' , category21_id = '64', category22_id = '64', category23_id = '64', category24_id = '64', category25_id = '64' where box_id = '1'

 

[TEP STOP]

 

when I export my database for categories_more it looks like this

 

 

--

-- Table structure for table `categories_more`

--

 

CREATE TABLE `categories_more` (

`box_id` tinyint(5) NOT NULL auto_increment,

`infobox_name` varchar(255) NOT NULL default 'infobox',

`enabled` tinyint(4) NOT NULL default '0',

`category1_id` int(11) NOT NULL default '0',

`category2_id` int(11) NOT NULL default '0',

PRIMARY KEY (`box_id`)

) TYPE=MyISAM AUTO_INCREMENT=52 ;

 

--

-- Dumping data for table `categories_more`

--

 

INSERT INTO `categories_more` VALUES (1, 'box1', 0, 0, 0);

INSERT INTO `categories_more` VALUES (2, 'box2', 0, 0, 0);

INSERT INTO `categories_more` VALUES (3, 'box3', 0, 0, 0);

INSERT INTO `categories_more` VALUES (4, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (5, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (6, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (7, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (8, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (9, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (10, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (11, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (12, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (13, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (14, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (15, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (16, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (17, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (18, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (19, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (20, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (21, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (22, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (23, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (24, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (25, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (26, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (27, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (28, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (29, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (30, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (31, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (32, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (33, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (34, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (35, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (36, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (37, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (38, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (39, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (40, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (41, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (42, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (43, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (44, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (45, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (46, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (47, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (48, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (49, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (50, '', 0, 0, 0);

INSERT INTO `categories_more` VALUES (51, '', 0, 0, 0);

 

I only created 3 boxes since I only need one more

does it look right?

 

 

I can't figure out what I did wrong and am in need of proffecional guidence, please help

Michelle, ma belle, these are scripts that go together well !!

Link to comment
Share on other sites

I recreated the categories_more table for the database and when I went to my admin more categories and made an update it sad,

Success: Categories have been successfully updated.

 

and I found out the "BOX_CATALOG_MORE_CATEGORIES" is a result of turkish language admin..

 

but I still don't see my katalog page changing, can anybody help?

Michelle, ma belle, these are scripts that go together well !!

Link to comment
Share on other sites

Bob, I'm glad you're figuring things out -- seems that most folks are having the same types of problems, and figuring them all out as well. Excellent.

 

Regarding changing your catalog page, it looks like none of the boxes you created (box1, box2, box3) are actually enabled. You need to enable each box, and then you'll probably want to disable the default category box.

 

-jared

Link to comment
Share on other sites

Cleve (and others) who would like to disable the ?infoBox=x in the URL: In includes/boxes/more_categories.php, change this:

CODE

 

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

 

But Jared, now I'll lose all my rankings for ?infoBox=0

 

;-) :-"

 

 

 

Actually, you commented that line out in mine when we fiddled with the code so that it worked with category box enhancement. it now reads:

 

 

<?php
/*
 $Id: more_categories_cleve.php, v 1.1 2005/06/29 jcall Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Released under the GNU General Public License
*/

 function new_tep_show_category($boxId,&$cPath_array,&$tree,$counter)
 {
global $cat_name; // CategoryBox Enhancement
for ($i=0; $i<$tree[$counter]['level']; $i++)

  $categories_string .= "  ";

$cPath_new = 'cPath=' . $tree[$counter]['path'];  // CategoryBox Enhancement
$categories_string .= '<a href="';
$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';  // CategoryBox Enhancement

/* commented for CategoryBox Enhancement
if ($tree[$counter]['parent'] == 0)

  $cPath_new = 'cPath=' . $counter;

else

  $cPath_new = 'cPath=' . $tree[$counter]['path'];

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

// CategoryBox Enhancement
if (tep_has_category_subcategories($counter)) {
  $categories_string .= tep_image(DIR_WS_IMAGES . 'arrw1_L.gif', '');
}
else {
  $categories_string .= tep_image(DIR_WS_IMAGES . 'arrw2_L.gif', '');
}
// CategoryBox Enhancement	

// display category name

/* uncomment this section if you want the little arrows to the left of the categories  
if (tep_has_category_subcategories($counter)) {
  $categories_string .= tep_image(DIR_WS_IMAGES . 'pointer_blue.gif', '');
}
else {
  $categories_string .= tep_image(DIR_WS_IMAGES . 'pointer_blue_light.gif', '');
}
/* end section  */

 

Should I change it somewhere else?

Quidquid latine dictum sit, profundum viditur.

Link to comment
Share on other sites

Bob, I'm glad you're figuring things out -- seems that most folks are having the same types of problems, and figuring them all out as well. Excellent.

 

Regarding changing your catalog page, it looks like none of the boxes you created (box1, box2, box3) are actually enabled. You need to enable each box, and then you'll probably want to disable the default category box.

 

-jared

 

Hi Jared, thanks for the reply! yes my boxes are enabled and updated.. but when I go to Admin > Configuration > More Categories where you told me to disable the default category box I now see this warning

 

Parse error: parse error, unexpected T_STRING, expecting ')' in /home/blaststo/public_html/admin/configuration.php(125) : eval()'d code on line 1

 

when I press the edit button .

 

and should there be any text under the value coloumn , because I don't see any.

do you have any idea why it isn't working?

b.

blaststore.com

Michelle, ma belle, these are scripts that go together well !!

Link to comment
Share on other sites

Help me please...

 

Installed More Categories and got it all set up. Works great with the one category box. As soon as I enable box 2 however - everything in the main page area of my screen (where all my products are displayed) gets shifted WAAAAY down to the bottom of the page. So unless you knew to scroll down people would think that no products were being displayed. Not so good.

 

Any ideas? This is the answer to my problems but this problem keeps me from being able to use it.

 

Thanks,

J.T.

Link to comment
Share on other sites

Hrmmm I've looked at the page in Firefox and IE - all that white space is there in both of them.

 

This is killin' me. Can anyone help?

 

 

Help me please...

 

Installed More Categories and got it all set up. Works great with the one category box. As soon as I enable box 2 however - everything in the main page area of my screen (where all my products are displayed) gets shifted WAAAAY down to the bottom of the page. So unless you knew to scroll down people would think that no products were being displayed. Not so good.

 

Any ideas? This is the answer to my problems but this problem keeps me from being able to use it.

 

Thanks,

J.T.

Link to comment
Share on other sites

JT - which version did you install? I haven't tried any of the releases after my releases, so I can't comment on them without trying them first.

 

Cleve, I just made those changes on my test server again, and they worked perfectly. For reference, here is the top section of my includes/boxes/more_categories.php:

<?php
/*
 $Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 function new_tep_show_category($boxId,&$cPath_array,&$tree,$counter)
 {
global $cat_name; // CategoryBox Enhancement
for ($i=0; $i<$tree[$counter]['level']; $i++)

  $categories_string .= "  ";

//	$cPath_new = 'cPath=' . $tree[$counter]['path'];  // CategoryBox Enhancement
$categories_string .= '<a href="';

if ($tree[$counter]['parent'] == 0)

  $cPath_new = 'cPath=' . $counter;

else

  $cPath_new = 'cPath=' . $tree[$counter]['path'];

//	$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';  // CategoryBox Enhancement
$categories_string .= tep_href_link(FILENAME_DEFAULT, 'infoBox=' . $boxId . '&' . $cPath_new) . '">';
// if you want to remove the boxId from the URL, comment the line above and uncomment the line below this comment.
//   $categories_string .= tep_href_link(FILENAME_DEFAULT, '&' . $cPath_new) . '">';

 

-jared

Link to comment
Share on other sites

Hi Jared - I have the version with the pictures installed.

 

You can see my crappy store running it here http://www.chromewhore.com/shop/

 

But I have only the 1st category box active because I don't want my store looking all jacked up today while people are shopping.

 

Thanks,

J.T.

 

 

 

JT - which version did you install? I haven't tried any of the releases after my releases, so I can't comment on them without trying them first.

 

Cleve, I just made those changes on my test server again, and they worked perfectly. For reference, here is the top section of my includes/boxes/more_categories.php:

<?php
/*
 $Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 function new_tep_show_category($boxId,&$cPath_array,&$tree,$counter)
 {
global $cat_name; // CategoryBox Enhancement
for ($i=0; $i<$tree[$counter]['level']; $i++)

  $categories_string .= "  ";

//	$cPath_new = 'cPath=' . $tree[$counter]['path'];  // CategoryBox Enhancement
$categories_string .= '<a href="';

if ($tree[$counter]['parent'] == 0)

  $cPath_new = 'cPath=' . $counter;

else

  $cPath_new = 'cPath=' . $tree[$counter]['path'];

//	$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';  // CategoryBox Enhancement
$categories_string .= tep_href_link(FILENAME_DEFAULT, 'infoBox=' . $boxId . '&' . $cPath_new) . '">';
// if you want to remove the boxId from the URL, comment the line above and uncomment the line below this comment.
//   $categories_string .= tep_href_link(FILENAME_DEFAULT, '&' . $cPath_new) . '">';

 

-jared

Link to comment
Share on other sites

Okay the pics are disabled now but that's not it. I have the 2nd category active now and you can see how the center is shifted down. Take a look please and let me know what you think.

 

www.chromewhore.com/shop

 

I will take the 2nd category off before the night is over so it's not there tomorrow.

 

 

 

Hi Jared - I have the version with the pictures installed.

 

You can see my crappy store running it here http://www.chromewhore.com/shop/

 

But I have only the 1st category box active because I don't want my store looking all jacked up today while people are shopping.

 

Thanks,

J.T.

Link to comment
Share on other sites

Hi Jared,

 

I have a question. Is it possible to have each category box with a different colour border, header, etc?

 

It seems to be in fashion. For an example, take a look at dabs.com: http://www.dabs.com/HomePage.aspx

 

I have tried to work out how to do it but failed.

 

Brilliant contribution, by the way. Quite unique and makes the site easier to navigate.

 

Best,

 

Bob

Link to comment
Share on other sites

Hi Jared

 

Your contrib is just what i am looking for but i tried (after a successful install) to put some of my categories in a box.

 

I have sts fitted and have set my template up using the 'Table trick', so that the content comes first (after mounds of code :-) left center and right colums are fixed widths

 

Quick explain - i had two categories cards and gifts. Then discovered your contib wants all the subs into top cats, no problem.

 

I moved the subcats for the gifts to the top and put them in box 2, just to try it out.

 

It worked ok but the left column width doubled and the right column disappeared.

 

As this is a live site, i quickly did a reverse of everything back to original, but i would still like to use this great contrib.

 

Any ideas?

 

 

Thanks in advance

 

Paul

Link to comment
Share on other sites

I'm sorry Paul, but no testing at all has been done with any template systems, including STS and BTS.

 

My guess is that the width problem is related to the "table trick".

 

-jared

Link to comment
Share on other sites

I'm sorry Paul, but no testing at all has been done with any template systems, including STS and BTS.

 

My guess is that the width problem is related to the "table trick".

 

-jared

 

Ok Jared, thanks for answering. A pity as it bought my products to the top category:-)

 

Kind Regards

 

Paul

Link to comment
Share on other sites

Hi Jared,

 

I have traced a problem we have been having with checkout_success.php to a line of code in more_categories.php.

 

The error is this: Fatal error: session_register(): Failed to initialize storage module: user (path: /tmp) in /includes/functions/sessions.php on line 74.

 

The line of code in more_categories.php that seems to be the cause is: tep_session_register('infoBox');

 

When I comment out this line, the error goes. When I remove the comment, the error returns.

 

Strangely enough, when I comment out the line, the more categories contribution continues to operate regardless.

 

Our site runs on osCMax, which is a modified version of osCommerce.

 

So, not being knowledgeable about php, could you answer the following questions about the code (tep_session_register('infoBox');

 

1. what does it do?

2. do you think it may operate better, as far as our site is concerned, if it was moved to another file (e.g. checkout_process.php) or do you think the error may be caused by another reason?

 

Thank you for you help on this.

 

Best,

 

Bob

 

PS Great contribution by the way.

Link to comment
Share on other sites

Bob - - sounds like you're saving session info to the filesystem rather than to the database. This error will probably go away if you change your includes/configure.php to say:

define('STORE_SESSIONS', 'mysql');

 

-jared

Link to comment
Share on other sites

Bob - - sounds like you're saving session info to the filesystem rather than to the database. This error will probably go away if you change your includes/configure.php to say:

define('STORE_SESSIONS', 'mysql');

 

-jared

 

 

Thanks Jared, for that rapid reply.

 

I checked configure.php, and it already includes that line of code.

 

By the way the code on line 74 of sessions.php is:

global $session_started;

 

Any other suggestions would be very welcome.

 

All the best,

 

Bob

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...