Importing a new list of products/prices

Posts: 71
Joined: 04/05/2008
Bug Finder

Hello,

I searched the forum for this but the forum threads i found were not conclusive to me.

I'm setting up a new Ubercart powered shop (RC1) and i have the full list of products on a Excel file.

The Excel file has 3 columns:

- Product code;
- Description;
- Price;

Whats the best way to import this list from Excel into Ubercart?

I know i can export from Excel to CSV but the Importer module that comes with Ubercart seems to work with XML only.

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

With a little bit of PHP/MySQL knowledge, you could make a script that parses the CSV output and updates your database directly... assuming the only things that might change here are the description / price. The product code would map to product SKU in Ubercart, correct?

Posts: 71
Joined: 04/05/2008
Bug Finder

Hi,

Yes, the Product code maps to SKU.

I have only a few test products on my database.
I want to import a list of completely new products.

I tried this module - uc_import_csv_alpha1.zip - it seemed perfect but its giving me an error:


Fatal error: Call to a member function data() on a non-object in C:\xampp\htdocs\xxx\sites\all\modules\ubercart\uc_importer\uc_importer.module on line 984

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Yeah, that hasn't been supported for a while and is probably overkill for your needs. I don't suppose you have any PHP mojo.. Puzzled

Posts: 71
Joined: 04/05/2008
Bug Finder

No coding skills at all Sad

Ubercart is quite nice, but the lack of a decent import scheme will put off lots of potential "clients".

I'll scavenge thru the forum and modules, see if i can find something that helps me.
If that doesnt work, i might hit the bounty forum.

Posts: 1139
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Might try the node import module from Drupal. I'm not positive it'll match every field, but it's worth a shot.

http://drupal.org/project/node_import

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 71
Joined: 04/05/2008
Bug Finder

My products setup is quite simple for now and I was under the impression that the only required fields for new products were SKU, NAME and SELLING PRICE.

But after reading some threads, i think those are not the only ones.
But still, i cant find a place that explains this, so i'm just wondering.

Posts: 71
Joined: 04/05/2008
Bug Finder

torgosPizza wrote:
Might try the node import module from Drupal. I'm not positive it'll match every field, but it's worth a shot.

http://drupal.org/project/node_import

Well thanks torgosPizza!

I just finished using node_imported with the "ubercart.inc" file from http://www.ubercart.org/comment/7642/node-import-add and my first import was successful!

PS - I'm running RC4 now.

Posts: 8
Joined: 01/27/2008

Funny thing... I followed all the steps and what happened is something much like what was once reported in here and here, only that during Field Mapping phase, everything is listed out correctly.

When I hit the Preview page, the only thing listed are the products' name. No price, no SKU, no anything. If I proceed, the node is added, but not as a product. As a matter of fact, when I list Content (admin/content/node), content type is even empty, and Edit returns an error, something like:

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_node_form' was given in \includes\form.inc on line 218.

Anyone can figure out what probably went wrong?

I'm using node_import-5.x-1.6 under ubercart 1.0.