This is G o o g l e's cache of http://www.ubercart.org/forum/support/1091/bulk_upload_products as retrieved on Aug 2, 2007 21:28:54 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:6hSbOAKh6GMJ:www.ubercart.org/forum...
Google is neither affiliated with the authors of this page nor responsible for its content.
These search terms have been highlighted: 07 21 2007
Ubercart
* Home
* Documentation
* Forums
* Issues
* Livetest
Home » Forums » Ubercart » Support
Bulk Upload of Products
Submitted by frednwright on Mon, 06/11/2007 - 16:21
frednwright
Posts: 8
Joined: 06/05/2007
I realize this question has to do with database prowess rather than Ubercart chops, but I would be interested in finding out if anyone has attempted a bulk-upload of their product data into their database? Which table/tables do you upload too, and is this a BAD IDEA to attempt?
I am running my site on SQL 5.0 using PhpMyAdmin. Thanks!
* Add new comment
permalinkMon, 06/11/2007 - 17:24
Andy
Posts: 256
Joined: 09/27/2006
Administrator
I remember at least one person has done it, but I can't remember who. It definitely can be done for base products. When you start getting into attributes, multiple images etc. . . it gets a little hairy. Are you importing from a previous shopping cart, or from raw data like a spreadsheet or comma delimited file?
Andy
* reply
permalinkMon, 06/11/2007 - 17:26
frednwright
Posts: 8
Joined: 06/05/2007
I would be importing from raw data (CSV file or something like that) - I haven't set up my products yet, and was trying to avoid typing them in one at a time!
* reply
permalinkTue, 06/12/2007 - 07:41
Lyle
Posts: 569
Joined: 09/26/2006
AdministratoreLiTe!
I've been working on a product importer/exporter for a little while. It works based on an XML file that's fairly easy to generate. I'll see about getting an example file from the livetest, as well as the code that parses it and saves the information to Drupal.
* reply
permalinkTue, 06/12/2007 - 08:47
frednwright
Posts: 8
Joined: 06/05/2007
Thanks Lyle!
* reply
permalinkTue, 06/12/2007 - 16:03
druru
Posts: 221
Joined: 03/21/2007
Brain Stormer
i'd love to see this too..
lyle, any way you can include a more complex example that also updates at cck fields of new content types as classes per your recent addition to the code?
i imagine for node reference type fields that exsit on a class, the import would have to be in three phases.
1) FIRST import all the referenced TO nodes (std vanilla standalone nodes that exist OUTside of uc).
2) get the nids of all the referenced to nodes
3) THEN after knowing the nids, import your uc products using the nids from steps 1-2 to insert the appropriate nid's into the cck noderef field.
thanks
* reply
permalinkWed, 06/13/2007 - 01:43
kulvik
Posts: 77
Joined: 12/20/2006
Brain StormerBug Finder
Making a "standard" import/export script sounds like an excellent idea.
I know that Erlend (quaoar) in our firm have written sort of an import script in python (though very specialized), but what we haven't figured out how to do yet is to import product images. This is a problem we will have to face real soon when we are going to try and setup a ubercart version of one of our existing stores. It's a book store with 60.000 customers and 4.000.000 books. The books themselves will be very easy to import (no attributes), but the book images is a different story. Have anyone done this? We need to do it the "proper" way with imagecache to generate thumbnails and all that.
--
Thomas Kulvik
Ny Media AS
www.nymedia.no
thomas (at) nymedia.no
* reply
permalinkWed, 06/13/2007 - 09:49
Lyle
Posts: 569
Joined: 09/26/2006
AdministratoreLiTe!
OK, I've added the importer module to the repository. I decided to have it use the simple XML extension that comes with PHP 5 because it makes that job a lot easier. If you're still stuck with PHP 4, I'm sorry.
I haven't been releasing the importer script mostly because of its unfinished state. The interface to export products and other Ubercart data is still pretty horrid, and the actual XML generator hasn't been updated with any of the recent changes that have been happening. The importer, however, works pretty well, as long as you give it a good XML file to work with.
I've attached the script I used to create an XML file from the database of our restaurant equipment site. It's running on osCommerce, so the script uses its particular idiosyncrasies to connect to the database and such. I run it from the administrative section of the site because it outputs sensitive information, particularly our buying price of equipment.
There is also an XML file that was generated by the export script. I took out the descriptions because they are far too long, and other site specific info for privacy. It includes attributes and catalog categories because those are features that osCommerce supports. Getting an example for classes will take a while, probably until I get the exporter up to date.
Finally, here (store.xsd) is the schema definition for the imported XML. This is mostly just to show what the XML files are validated against when viewed in a web browser. It can help you debug your import files to make sure they will work properly.
Attachment Size
export.php_.txt 7.92 KB
m14-products.txt 31.47 KB
* reply
permalinkWed, 06/13/2007 - 13:07
kulvik
Posts: 77
Joined: 12/20/2006
Brain StormerBug Finder
Thanks a lot Lyle. I'll give this a look and a try Smiling
--
Thomas Kulvik
Ny Media AS
www.nymedia.no
thomas (at) nymedia.no
* reply
permalinkThu, 06/14/2007 - 08:12
K.P.
Posts: 17
Joined: 03/20/2007
Bug Finder
I really just had a quick look at store.xsd ... but how would I handle CCK-fields (which I will use as extension of the product content type or as extension of product classes)?
* reply
permalinkThu, 06/14/2007 - 10:09
Lyle
Posts: 569
Joined: 09/26/2006
AdministratoreLiTe!
You can't yet. Neither the importer nor the schema definition supports extra data in the product object. I'm not sure how I'm going to go about making that happen, but something should come to me before too long.
* reply
permalinkSat, 07/21/2007 - 15:34
jimijamesi
Posts: 26
Joined: 03/29/2007
Great Script for importing products
Noticed that it supports image inclusion, fields for : image name, path, title, alt text... fantastic...
When Starting with an excel file what steps or guidelines should be followed for minimum frustration...
I know excel can save as xml but what preparation steps are recommended?
I am using the xml schema to map to the cells/columns on the excel worksheet...
any tips?
Thanks in advance...
* reply
permalinkMon, 07/23/2007 - 10:52
Lyle
Posts: 569
Joined: 09/26/2006
AdministratoreLiTe!
I've never used Excel to make XML, so I can only point you to the schema definition. If you can get your file to validate against it, you should be in good shape. http://www.ubercart.org/files/store.xsd There's stuff in there for defining orders, but it's not necessary.
* reply
permalinkThu, 07/26/2007 - 11:26
hugslife
Posts: 1
Joined: 07/26/2007
Total n00b alert! I run a bookstore site that carries 2,000+ items, and is updated with new items etc on a near daily basis. Just had to add my 2¢ worth...
Ubercart is a godsend, after having wrestled with osCommerce, ZenCart, VirtueMart et al for the last four years. An "Easy Populate"-type module that supports user-created product classes + CCK fields is the "killer app" that I've been looking for. Judging from the forums at all those other carts, scores of other folk have been looking for this feature too.
Anyhow, just my 2¢. Keep up the great work!


Joined: 08/07/2007