6 replies [Last post]
stormer's picture
Offline
Joined: 09/16/2007
Juice: 110
Was this information Helpful?

Does anyone have a sample XML file for importing (as per http://www.ubercart.org/docs/user/354/importing_data)? I have no XML experience and figured that the easiest way to get my head around it would be to view a sample file.

many thanks.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Sample XML file for import

You can set up some test products with categories, attributes, and such and export them using Übercart. The more complex your products, the more complete the XML will be.

Shawn Conn's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 916
If this helps...

If that doesn't help you enough to create your own XMLs from Ubercart, here's a portion of categories and a few products that got imported for our true equipment parts site.

AttachmentSize
sample.xml 13.26 KB

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine

CpILL's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 549
Re: If this helps...

Why is /store/products/product/manufacturer = 'True'?

Also, how did you do the different options for 'extended warranty?"? As attributes? COuld you post a sample that uses attributes?

Uberdevelopment www.tsd.net.au/blog

Shawn Conn's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 916
Another sample

See the documentation regarding the manufacturer field for a product:

XPath:/store/products/product/manufacturer
Type:String
Required/Occurrences:No, 1
Description:The name of the manufacturer. Correlates to the free-tagging form on the product edit page.

As for the sample, here's a snippet of the XML Lyle used to import the True equipment on our site. Lyle, being the Import/Export guy, is really the person to talk to if you have technical questions. All I know is I write the XML and it works good.

AttachmentSize
sample2.xml 33.28 KB

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Re: If this helps...

"Why is /store/products/product/manufacturer = 'True'?"

Because that's the manufacturer's name: http://www.truemfg.com
When I started working here, I kept thinking, "So do we also carry some false refrigerators?"

stormer's picture
Offline
Joined: 09/16/2007
Juice: 110
Re: Sample XML file for import

thanks very much to both of you, very much appreciatd.