Hi Guys,
I am creating a website for my daughters on a shared hosting platform, they will not be holding stock but just be displaying B2B and B2C products.
The suppliers update the product availability in an XML file (feed) a number of times a day.
So the plugin which if created properly could be used for other people, this is what it needs to do.
This would be the setup fields:
File Name [ ] This would be the online file path!
File Upload [ ] Boolean Flag to allow optional upload of a file from the harddrive
Product Node [ ] The product parent node
SKU Node [ ] This is the mapping for the NOP field: SKU
MPN Node [ ] This is the mapping for the NOP field ManufacturerPartNumber
Quantity node [ ] This is the maping for the NOP Field StockQuantity
Hide if Zero [ ] Checkbox set to NOP Field Published false if out of stock
So we might have:
File Name [http://www.suppliersfeed/products/downloads/stock.xml]
File Upload [X]
Product Node [PRODUCT]
SKU Node [ITEM]
MPN Node [BARCODE]
Quantity node [QUANTITY]
Hide if Zero [X]
Then a [ GO ] or [ Update ] button
Code that will read the file, or open the file if File Upload is selected
loop through the PRODUCT Nodes
Match the NOP fields on SKU or MPN
If it does not find a match then just skip to the next node
If it does find a match then update the Stock quantity
If the Hide if Zero is true, then if the quantity = 0 set the published to false
EXAMPLE XML
<?xml version="1.0" ?>
<WEBITEMS>
<CREATED value="Fri Nov 16 13:26:21 UTC 2012">
<CATEGORY id="1" name="Category 1">
<PRODUCT ITEM="12345">
<NAME>Web Item 1</NAME>
<BARCODE>5555555555555</BARCODE>
<PRICE>29.99</PRICE>
<MANUFACTURER>NOPCommerce</MANUFACTURER>
<WEIGHT>3.7</WEIGHT>
<MODEL>12345</MODEL>
<QUANTITY>24</QUANTITY>
<DESCRIPTION>Description 1<br/></DESCRIPTION>
<WEB_DESCRIPTION>Description 1<br/>Description 2<br/></WEB_DESCRIPTION>
<RETAIL_PRICE>39.99</RETAIL_PRICE>
</PRODUCT>
<PRODUCT ITEM="23456">
<NAME>Web Item 1</NAME>
<BARCODE>6666666666666</BARCODE>
<PRICE>19.99</PRICE>
<MANUFACTURER>Nike</MANUFACTURER>
<WEIGHT>1.7</WEIGHT>
<MODEL>22345</MODEL>
<QUANTITY>0</QUANTITY>
<DESCRIPTION>Description 1<br/></DESCRIPTION>
<WEB_DESCRIPTION>Description 1<br/>Description 2<br/></WEB_DESCRIPTION>
<RETAIL_PRICE>29.99</RETAIL_PRICE>
</PRODUCT>
</CATEGORY>
</CREATED>
</WEBITEMS>
Regards
David