I would like to use node_import to import a csv of 'products'. I got it working with the older versions of Drupal,E-commerce, and node_import (It wasn't very difficult because I think everything was in one table)...But now I am stuck. I guess there is no longer a title field in the ec_product table. Appearently the ec_product is tied to the product node (which is in a different table). Could I create a file the specifically says to import this data to product node (title and node data) and that data to the ec_product table (Pricing and other data).

Am I just way off here? I can't figure out importing products into e-commerce using node_import. I know this would be a very valuable feature for many people...

Thanks,
Tom

Comments

dado’s picture

Tom,
node_import provides an API for hooking up any node type so it can be imported. You can see examples in current head version. Or look at (comments in) the API example doc
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/node_import/n...

It would not be that hard to make products importable. Here is the code needed to make the story module importable

function story_node_import_types() {
  return array('story' => t('Story'));
}

function story_node_import_fields($type) {
  if ($type == 'story') {
    return array('title' => t('Title'), 'body' => t('Body'));
  }
}
Robrecht Jacques’s picture

Title: node_import to multiple database tables? » node_import and e-commerce module
Component: Miscellaneous » Code
Category: task » feature
Status: Active » Postponed

Support e-commerce module

Robrecht Jacques’s picture

Status: Postponed » Active

node_import now supports the tangible.module of the e-commerce module bundle.

Please test and report back.

stormrider-1’s picture

Yes, I've tested it does support tangible product. Would be nice if it worked also with ubercart