8 replies [Last post]
doomed@drupal.org's picture
Offline
Bug Finder
Joined: 04/05/2008
Juice: 334

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.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15422
Re: Importing a new list of products/prices

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?

doomed@drupal.org's picture
Offline
Bug Finder
Joined: 04/05/2008
Juice: 334
Hi,

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

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15422
Re: Hi,

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

doomed@drupal.org's picture
Offline
Bug Finder
Joined: 04/05/2008
Juice: 334
Re: Re: Hi,

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.

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Re: Re: Hi,

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

--
Help directly fund development: Donate via PayPal!

doomed@drupal.org's picture
Offline
Bug Finder
Joined: 04/05/2008
Juice: 334
required fields

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.

doomed@drupal.org's picture
Offline
Bug Finder
Joined: 04/05/2008
Juice: 334
torgosPizza wrote:Might try
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.

Leo
Leo's picture
Offline
Joined: 01/27/2008
Juice: 17
Re: torgosPizza wrote:Might try

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.