Jump to content

Import products from distributor api


Recommended Posts

Hello,

 

I want to import about 15000 products from my distributor. Every product has "Supplier code". I get .xml file which contains:

  • Supplier refference ID
  • Product name
  • Category name
  • Price
  • Amount in stock

I have access to my suppliers API where I can use function for example:

getProductImages($supplierRef);

which returns list of product images. Same with lets say:

getProductDescription($supplierRef);

which returns description of product.

 

How should I import these products to my prestashop instance?

Link to comment
Share on other sites

You might find some generic utility that will take the XML and output a CSV (Excel insert-data facilities perhaps?) that can be then imported using the standard prestashop functions to create the basics of the products, but having to use an API call to get most of the information means, unless you wish to name your supplier in the hope that somebody else has already done this, then you are almost certainly going to have to write some custom code.

 

You then have the choice of either linking to the Prestashop API, or to output a more comprehensive CSV file which can then be imported. The latter is easier, especially to debug, but is not as useful if you want to run it repeatedly, e.g. to keep things synchronised between your shop and your supplier (e.g. keeping stock levels updated, removing items that are no longer available, etc.) 

Link to comment
Share on other sites

The distributor is ACC (ACC Distribution). Ok. I think I could handle CSV Import somehow. But then my main issues would be:

  • I have 15000 products. Each of them has about 4 image urls. Is it possible to use these external images? Or do I must to download them and use locally?
  • Am I able to update stock and price values of each product regullary with regular CSV import?
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...