Jump to content

How To Add Product With A PHP Script In Prestashop


Wotek

Recommended Posts

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();

  • Like 1
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...