Jump to content

Edit History

Titi2

Titi2

Hello Guys!

I'm developping a custom module which give me the possibility to create a product programatically. in the Product() object i have to specify catégories of my products with the addToCategories() method. But for now i just have the name of categories.

$product->addToCategories() method takes an array of ids categories as argument. So, how can i retrieve the categories ids associated to my categories names please? Seems Prestashop does not provide a function for it.

Titi2

Titi2

Hello Guys!

I'm developping a custom module which give me the possibility to create a product programatically. in the Product() object i have to specify catégories of my products with the addToCategories() method. But for now i just have the name of categories.

$product->addToCategories() method takes an array of ids categories as argument. So, how can i retrieve the categories ids associated to my categories names please? Seems Prestashop does not provide a function for it.

×
×
  • Create New...