Mapolin Posted December 9, 2019 Share Posted December 9, 2019 (edited) 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! Edited December 9, 2019 by Mapolin (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now