Hello,
I'm trying to create product with multiple attributes with the Prestashop 1.7 API.
Everything is OK to create a simple product, but do you know if there is a documentation or an advised method to create a product with by example a mix of 2 colors and 2 sizes ?
I use this library :
https://github.com/PrestaShop/PrestaShop-webservice-lib
I've check in the official doc here without success, there is no details : https://devdocs.prestashop.com/1.7/development/webservice/tutorials/prestashop-webservice-lib/
I think there is maybe three solutions :
- post all variations in one time
- make a special part in the code for add each variation (4 in my case, 2 colors and 2 sizes)
- make a home-code for add informations with Php/SQL
I think about something like this but without success :
$product->associations->combinaisons->addChild('combinaison')->addChild('id, $newId');
$product->associations->combinaisons->addChild('combinaison')->addChild('ean13', $newEan13);
Please, maybe someone have an idea or have ever do this ?
Attached, my actual script.
++