I'm new to Ruby and Rails and trying to use it to work on a project for
I have a Shopify store, which I can access my products.xml feed through
the API, Shopify feed sample attached.
I have another feed from the wholesaler I use that has the latest stock
levels. Whole feed sample attached.
The common link between the two is the SKU code, as I added all of the
products with the same code. The attribute for the stock level isn't the
same. On the wholesale feed it's <stock> with Shopify using
I'm trying to work out how to take the wholesale feed, and combine it
into my product feed, which I can then regularly apply to my Shopify
store to keep it updated with the latest stock levels.
I've been reading a lot, testing Nokogiri and the builder, but I'm not
sure if I'm going about this the right way. Currently I think the way
forward is to parse both feeds into the same MySQL database and then
build a new XML file from that to update Shopify.
However is there a way that I can have the wholesale XML feed check it's
SKU code against my Shopify XML, update the attribute field for stock
level and append it to the correct product?
My skill level is low, so I'm prepared for this to take awhile, but
hoping someone can steer me in the right direction so I'm doing it
correctly (keeping in mind that I'm sure there are multiple ways to do