fleeced Posted June 23, 2015 Share Posted June 23, 2015 I've have access to a XML feed that would be great for keeping our prices up to date and maybe adding new products. Is it possible to get XML integrated with OSC, perhaps via Easy populate after the feed has been imported. Thoughts? Link to comment Share on other sites More sharing options...
burt Posted June 23, 2015 Share Posted June 23, 2015 An XML feed does not need Easy Populate, you need a little script that will grab the XML and take the necessary data from it and then do something with that data. Straightforward enough. However, you need to ensure that the XML feed is mapped to your products in some way, eg: same ID, same model ... or some other flag, for this to happen. So, provide a small sample of the XML feed... Link to comment Share on other sites More sharing options...
MrPhil Posted June 23, 2015 Share Posted June 23, 2015 One approach would be to get the XML as a file on your server, run a processor script to convert it to a CSV file, and use the normal Easy Populate add-on to make use of the data. This would eliminate the need to modify Easy Populate to directly use XML input, but check if that might be easier than the conversion. Link to comment Share on other sites More sharing options...
fleeced Posted June 23, 2015 Author Share Posted June 23, 2015 Here is a XML sample from the 3rd party http://tiny.cc/xmlosc Thanks Link to comment Share on other sites More sharing options...
burt Posted June 23, 2015 Share Posted June 23, 2015 So the key would be (eg): <pId>FB_CABLE</pId> and the value would be (eg): <buynow>2.95</buynow> You now write a little PHP script that iterates thru the XML, matching the key to the products_model (which I presume matches), and update the price (aka value) accordingly. Link to comment Share on other sites More sharing options...
fleeced Posted June 23, 2015 Author Share Posted June 23, 2015 So you write a PHP script-drop it in your public_html directory and run it as a cron job, say every 4 hours. I assume something can be done via SSH/Shell this way too. Link to comment Share on other sites More sharing options...
MrTroye Posted June 26, 2015 Share Posted June 26, 2015 Another option would be to code a custom script, copy it to the the http server, and have that script read data from the XML file, and make appropriate changes to the DB. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.