Wotek Posted April 2, 2015 Share Posted April 2, 2015 Hi ? How i add product to Prestashop with Php object like this: http://blog.belvg.com/how-to-change-an-order-status-with-a-php-script-in-prestashop.htmlSimple product with only Name and ean code. $this->id_object = Tools::getValue('id_product'); $this->object = new Product((int)Tools::getValue('id_product')); This is OK ? Link to comment Share on other sites More sharing options...
rubberscotch Posted April 3, 2015 Share Posted April 3, 2015 Hi, if you want to add a product programmaticaly, you have to create a product object, give it the properties you want ( name, EAN, ref ... ) and then invoke the add method : $product = new Product(); $product->name = 'The Name You Want to Give It'; $product->reference = 'Reference'; $product->ean = '01020304050607'; ... $product->add(); 1 Link to comment Share on other sites More sharing options...
Wotek Posted April 3, 2015 Author Share Posted April 3, 2015 Hi, if you want to add a product programmaticaly, you have to create a product object, give it the properties you want ( name, EAN, ref ... ) and then invoke the add method : $product = new Product(); $product->name = 'The Name You Want to Give It'; $product->reference = 'Reference'; $product->ean = '01020304050607'; ... $product->add(); Thank You. Thank You again, again and again. 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