Woocommerce Product Sync
We have created custom code to import Product data in WordPress Woocommerce Database. As per requirement, we have to import 2 Feed APIs. We also need to modify the price, category mapping, product image mapping, and other woocommerce product attributes. Keep up to date product inventory, stocks, images, category wise products with load sharing algorithm by TheFoxLab which will run even in shared hosting. We highly recommended using dedicated hosting for your e-commerce website if more than 30k products.
Here are steps we follow to fulfilled needs:
Git used for processing large XML files:
https://github.com/prewk/xml-string-streamer
Here are steps we follow to fulfilled needs:
- Parse Product XML feed and populate products into the database. The cron script will import products, images, featured images, product attributes.
- Parse Product Stock XML API which runs frequently to update Stock on daily basis.
- CRON set up in a round-robin fashion, We created a text file with pagination so when cron run then read from the last offset because XML feed is too big (around 1.5 GB with 30k products).
- The program will update 30k records in 4 days :) cron frequency set every 4 minutes and process 20 products :)
Git used for processing large XML files:
https://github.com/prewk/xml-string-streamer
Technology used
Service offered
It was a superb experience to work with the TheFoxLab team, We have many obstacles due to the large XML feed but hopefully, everything works fine and getting support even after 2 months of work delivery when the supplier changed the feed attributes. Thanks.