Jump to content

Add categories


useris
 Share

Recommended Posts

Hi,

 

I'm want to write custom php script for importing categories and executed queries:

 

"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 ('NULL','" . $parent . "','1','" . $top . "','0','1','1',Now(),Now(),'" . $pos . "', '" . $top . "')";

 

"INSERT INTO `ps_category_group`(`id_category`, `id_group`) VALUES ('" . $id . "','1')";

 

"INSERT INTO `ps_category_lang`(`id_category`, `id_shop`, `id_lang`, `name`, `description`, `link_rewrite`, `meta_title`, `meta_keywords`, `meta_description`) VALUES ('" . $id . "','1','". $id_lang ."','" .$name . "','','" . $link . "','','','')";

 

"INSERT INTO `ps_category_shop`(`id_category`, `id_shop`, `position`) VALUES ('" . $id . "','1','". $top ."')"

 

Everything looks good in Mysql but there is no categories on home page, even in administration page i can not load categories page. In product page categories looks OK and i can choose category for products ....

 

Thank's for help

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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More