Jump to content

problem width add category to data base


kylo

Recommended Posts

hi 

(presta1.5.4)

 

I have problem to add categories to database.

I use multistore and i have parms 

id, parent,date add, date mod, name,desc, metatags 

 

im trying update tables with:

 "INSERT INTO `ps_category_shop` (

`id_category` ,
`id_shop` ,
`position`
)
VALUES (
'".$row['categories_id']."',  '3', '1'
);"
%%%%%%%%%%%
 
"INSERT INTO  `ps_category_lang` (
`id_category` ,
`id_shop` ,
`id_lang` ,
`name` ,
`description` ,
`link_rewrite` ,
`meta_title` ,
`meta_keywords` ,
`meta_description`
)
VALUES (
'".$row['categories_id']."',  '3',  '1',  '".$row['categories_name']."','".$row['categories_htc_desc_tag']."' ,  '".$link."', NULL , NULL , NULL
);
"
 
%%%%%%%%%%%
 
"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 (
 '".$row['categories_id']."',  '".$parent."',  '3',  '".$depth."',  '12','34',  '1',  '".$row['date_added']."',  '".$row['last_modified']."','1','0'
);"
%%%%%%%%%%%
insert into ps_category_group VALUES('".$row['categories_id']."','1');"
 
after this i use 
Category::regenerateEntireNtree();
to generate nleft and nright columns 
and categories still doesnt works to my shop.
i see them in BO to all shops but in FO doesnt exist
 

 

Link to comment
Share on other sites

  • 5 months later...

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
×
×
  • Create New...