Hello guys
I'm working on a module and I'm stuck on a part where I have to bulk import a catalog in a prestashop site. I have to create the category structure and add the products with their variations.
I'm doing this with a cron based on preset conditions, and I really need an example of a script that would help me figure out the code I need to write for import_product and build_category_structure (see pseudo code below). The data I'm working on is XML but I can parse it to whatever.
$products = [{ Product, ProductVariations }, { Product, ProductVariations }, { Product, ProductVariations }]; import_products($products); $categories = [{ name: Category, children: [ChildCategoryArray] }, { name: Category_2, children: [ChildCategoryArray] }]; build_category_structure($categories);
Any help would be greatly appreciated!