Jump to content

[Minor] Hide Categories


Guest EverythingWeb

Recommended Posts

Guest EverythingWeb

File Name :: Hide Categories

Author :: EverythingWeb

Category :: Minor

Description ::

Use this modification to 'hide' parent categories from the Categories listing box. Full installation instructions included, plus copies of the modified files.

Update: There was a slight error in the SQL command (missing a closing bracket). This is now included.

Updated Sat, Oct 1 2005 4:12 pm

View File

Edited by EverythingWeb
Link to comment
Share on other sites

Guest hennaboy

I installed this but dont see anywhere where you can select to hide the catagories.

also fyi the html file still has the wrong sql...

ALTER TABLE `_PREFIX_CubeCart_category` ADD `cat_active` ENUM('0','1') DEFAULT '1' NOT NULL;

is correct.... im sure that this is what you meant when you said it had been replaced.

Link to comment
Share on other sites

Guest EverythingWeb

I've just downloaded the zip file from the downloads section here and the SQL command in the HTML file looks fine. Strange.

Regards turning the categories off - when you on the category edit page, there is an option (the very last one) which is to hide or not to hide.

This is of course, if you have correctly updated the admin/categories/index.php page.

Link to comment
Share on other sites

Guest hennaboy

Just downloaded the file again and the sql reads

ALTER TABLE `_PREFIX_CubeCart_category` ADD `cat_active` ENUM('0',1') DEFAULT '1' NOT NULL;

However i get an error with that line as there is a missing '

ENUM('0',1')

should read ENUM('0','1')

i re-uploaded your index file on the cat section and it now shows.... so i must have missed something somewhere although as im with ntl i could have been staring at an old page the whole day.... quite possible. :)

Link to comment
Share on other sites

Guest hennaboy

Ok cool this works and it is just what i needed .... many thanks.... fyi

in the categories.inc.php i kept getting a mysql error....

this was because i had assigned my own prefix to the database.

$results = $db->select("SELECT cat_name, cat_id FROM ".$config['dbprefix']."cubecart_category WHERE cat_father_id = 0 AND cat_active = '1'");

so i had to change the line to read

$results = $db->select("SELECT cat_name, cat_id FROM ".$config['dbprefix']."MYPREFIX_cubecart_category WHERE cat_father_id = 0 AND cat_active = '1'");

after that all worked very well..

Many thanks :)

Link to comment
Share on other sites

  • 2 months later...

I want this for both parent and sub catagories, will it work at present or do i need to update it slightly to do both...

I just want cat's hidden untill im ready to release them and their products to the web...

Link to comment
Share on other sites

×
×
  • Create New...