Jump to content

add category with specific ID


Recommended Posts

Hi,

You look this code:

 

$object = new Category();

$object->id = 20;

$object->id_category = 20;

$object->name = "Server Linux 10 VANE 222";

$object->active = 1;

$object->position = 0;

$object->description = "This a description of category Server Linux 10";

$object->id_parent = 2; // Inicio

$object->level_depth = 2;

$object->link_rewrite = "server-linux-10";

$object->meta_title = "server linux 10";

$object->meta_keywords = "server, linux, 10, mcp";

$object->meta_description = "This is a meta description of server linux";

$object->is_root_category = 0;

 

$object->add();

 

I want insert the object with id = 20... but don't work... this object use autoincrement field of mysql... How I change it or force?

 

Regards

Link to comment
Share on other sites

×
×
  • Create New...