cancel
Showing results for 
Search instead for 
Did you mean: 

Import/Export Products with cron

Import/Export Products with cron

Greetings @everyone

 

I'm generally new to Magento, but i've decided to build my shop with it and i like this engine.

I'm skilled some with design and translations so it's not problem for me, but what is - automated import of good and regular base.

My distributors (all of them) have a special link where i can download their catalogs in .csv file. They update it each 4 hours. Formatting of this files is different between each self. The common options in it - goods name, avaible qty on stock, price for me, recommend price for reselling, dimensions and other goods options, pictures or video of goods.

 

I know how to make such things in OpenCart, but there it requires additional actions with .csv file before put it into parser and import.

My question is how to make same opearions in Magento 2 CE and make it running with cron.

 

Any help would be appreciated. I have 10 distributors and all their catalogs need to be imported and updated.

2 REPLIES 2

Re: Import/Export Products with cron

Anyone can suggest me any way?

Also as i said, there are corrections to each csv file required. And it should be done with script, not by hands.

Re: Import/Export Products with cron

Hello,

Here I can give you an idea for how we can proceed with the product creation through cron.

 

First you want to prepare the required fields in CSV file for the products like product name, sku, weight, etc. Images should be uploaded separately and the path needs to be specified in the csv file. you can do this in a separate file as a script by calling API and updating the details by passing the parameters in REST API call in magent and configure the file to run through cron setup or else create a new module with crontab.xml file with the CSV convertor logics. Finally generate a code for creating the products and updated the inventory for the existing products.

 

For REST API Calls example,

https://medium.com/@ahazeemi/the-totally-beginners-guide-to-magento-2-rest-api-3a773be2b425