Jump to content

How to create new sub category?


Recommended Posts

Hello,

 

   does anyone can help? I have deleted everything in Catalogue > Categories. Then I added new two categories for example: cars, boats. But I want add new subcategories. So I click on that category, then I add new but I can not expand parent category, because there is nothing. It seems that I have to create something like new root.

 

Thank you for your help.

Link to comment
Share on other sites

I still really do not know how :(

 

if you know how to run query script, run queries below to setup and create a fresh new both 'root' and 'home' category for your shop just like a new installation.

 

use your own prefix if you use database table prefix other than 'ps'

for example, I use 'btl' as prefix for my database tables, so in my case, i need to change 'ps_category' table into 'btl_category', 'ps_category_group' into 'btl_category_group'.... and so on...
got it?
 

-- ------------------------------------------------------------------------------------------------------------

 

TRUNCATE TABLE `ps_category`;

 
INSERT INTO `ps_category` (`id_category`, `id_parent`, `id_shop_default`, `level_depth`, `nleft`, `nright`, `active`, `date_add`, `date_upd`, `position`, `is_root_category`) VALUES
(1, 0, 1, 0, 1, 4, 1, '2014-12-20 03:40:14', '2014-12-20 03:40:14', 0, 0),
(2, 1, 1, 1, 2, 3, 1, '2014-12-20 03:40:15', '2014-12-20 03:40:15', 0, 1);
 
TRUNCATE TABLE `ps_category_group`;
 
INSERT INTO `ps_category_group` (`id_category`, `id_group`) VALUES
(2, 1),
(2, 2),
(2, 3);
 
TRUNCATE TABLE `ps_category_lang`;
 
INSERT INTO `ps_category_lang` (`id_category`, `id_shop`, `id_lang`, `name`, `description`, `link_rewrite`, `meta_title`, `meta_keywords`, `meta_description`) VALUES
(1, 1, 1, 'Root', '', 'root', '', '', ''),
(1, 1, 2, 'Root', '', 'root', '', '', ' '),
(2, 1, 1, 'Home', '', 'home', '', '', ' '),
(2, 1, 2, 'Home', '', 'home', '', '', ' ');
 
TRUNCATE TABLE `ps_category_shop`
 
INSERT INTO `ps_category_shop` (`id_category`, `id_shop`, `position`) VALUES
(1, 1, 1),
(2, 1, 1);
 
 
-- ------------------------------
 
after that, you can follow what dioniz posted above to make another category.
 
 
Regards
Edited by [email protected] (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...