I view this more as a working example, and skeleton for others to build on.

In Yahoo, there is an xml export that has the store settings and products.
I have created a little more than a straight forward import that lets you read in your own product structure and create products in a catalog and link it to a product Store. in the Case of Yahoo the Store setting are included in the Products export.

This is used over and over as the yahoo store is modified and is run as a scheduled task. There are properties to control its behavior.

This is accomplish thru two classes that you load with your import and the classes to the work of loading it into ofbiz.

At this time, it has handled about a 8 meg xml file.

here is what it does.

The Store Setting class will Create a new ProductCatalog, Store and Website, if it does not find one, then associated them all together. it has properties for defaults.


This uses the Product ID assigned by Yahoo for the ProductID in ofbiz.
the import checks if the productID already exists and make a Task if it does. I left a hook in there for Checking Good Identification as an alternative.

if it does not exist the it creates a product and inventory item and imports the various data. if the data includes Categories then they are added to the product catalog. if it does exist but all the values do not match then a task is created for someone to check an make changes.


The Product processing is sort of kludge in the way that it is from my online system, so I stole my code for products as a class that does all the work and modified it to ofbiz entities. At some point I may make it a service, but not this year.

the Products Class has some properties for setting defaults on import, so if they are Blank it fills them in.

if anything new is added then a task is generated, so it can be checked out.



for my purposes, I have created a application folder for my various import Exports, about 50 so far. This includes importing from suppliers emails, FTP and Websites exporting to website and ftp sites.

so should I create a patch from that folder or do you have some Ideas on how I should integrate the store/product/inventory import.



Reply via email to