Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Help: XML Feed From Vendor


Recommended Posts

Hi. Is there a way to import XML feeds from a vendor's database? I have a product catalog of about 200,000 items and it would help to have stock quantities up-to-date and an easier way of adding new items. Thanks.

Link to comment
Share on other sites

  • 1 month later...

Did you have any luck yet ? I developed my own piece of XML

in order to standardize on a format to fill my database with my

vendor's products. Not very much (about 2000 products), but

they vary from week to week, so a bit to much trouble to do it

all by hand... It would be neat to import this, not necessarily

using osCommerce, but that wouldn't hurt though... ;)



Link to comment
Share on other sites

Haven't seen anything yet... Our shopping site has now been delayed over a month since we have to add everything by hand - including downloading pictures from manufacturers sites and uploading them to the site... Plus, 200,000 products is NOT easy at all to maintain - just the database download, split, and import takes a whole day.


If there's anything out there that you can recommend, or have modified, or know about - please let me know..


Is your XML import a separate thing you run - or did you tie it into osCommerce?

Link to comment
Share on other sites

I wrote a tiny program that converts CSV format (ASCII) from (in my case) Excel into

XML. I've done this on 2 seperate occasions: once for a customer who received a

pricelist with 20000+ articles, once for myself.


The customer I mentioned used some administration program that could only

import a product pricelist in a strict predefined XML format. CSV to XML is a

breeze: 20000+ articles were converted in a few seconds (didn't time, less than 10

secs on a Celeron 600 PC...). The administration program took about 90 minutes

to crunch that XML file.


I receive weekly (sometimes daily) pricelist updates from my vendors. I still have

to convert them to CSV by hand, as these Excel files are cluttered with advertising

stuff, but after that it's simple to convert to XML. Once I can import it to MySQL,

the database can do all things regarding my own price updates and notify me on

products that went obsolete or came in a fresh. As soon as I have things working

on the XML to MySQL part, I have a legitimate reason to ask my vendors to

deliver in CSV right away. They only have do is leave the advertising stuff out...


Concerning your problem: it all starts by defining all input/output relations. Developing

an ASCII to XML translator is simple and should take no more than a few hours. The

problem lies in pinpointing the relations between the way that inputdata uses XML to

travel to the database and the way the database uses the data. Eg. if you use a

fixed margin on the major part of your products and some other margins on a few

(groups of) other products, where do you put your calculations to establish the selling

price ? You can do it right upfront in the conversion to XML, so the database can use

the difference between cost and sell to establish margins. You can do it in the database,

based on the type of data you're importing. You have to take all of these things into

account. It gets more complex for every additional datafield that your inputdata

contains. There's no easy solution. There are probably tools that can help building



I just found PHP Classes (I programmed a lot in the past, but am new to PHP) and

discovered XMLFile and "MySQL to XML - XML to MySQL". I'll dive into that to see

if it can bring me the solution...



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...