Here's a migrate/modules/contrib/uc_product.inc file so that you can import data into uc_product fields. I assume this should live here and not in UberCart?

CommentFileSizeAuthor
uc_product.inc_.txt1.15 KBdww
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dww’s picture

I asked the UberCart folks about this over at #478952-10: Properly namespace UberCart fields in $node, to see if they'd like to maintain this code instead of having it in here.

dww’s picture

Title: Import UberCart product fields » Support importing UberCart product fields with migrate.module
Project: Migrate » Ubercart
Version: 6.x-1.x-dev » 6.x-2.x-dev

Moshe said it'd be ideal if the UberCart folks maintain this. It allows you to import uc_product node fields using migrate. Super slick. I've been using this while converting an old osCommerce site to UberCart. Life saver!

Anyway, if this functionality lives in uc_product, you'd just need to append the uc_product_migrate_fields_node() function to uc_product.module, instead of having it as a separate .inc file as is the practice in the migrate.module's codebase... I could re-roll as a patch if desired.

rszrama’s picture

I think this patch should be enough, we'll just need to look through it to make sure nothing slipped through. Any gotchas we should know about, or is straightforward to use?

Also, mega congrats on porting from osC! : P

moshe weitzman’s picture

Title: Support importing UberCart product fields with migrate.module » Import UberCart product fields
Project: Ubercart » Migrate
Version: 6.x-2.x-dev » 6.x-1.x-dev

Seems small enough that we should be able to commit it if they disown it :)

mikeryan’s picture

Did Ubercart reject this? I do believe it's better for contrib module support to go into the contrib module, so it can track changes to that module...

dww’s picture

Title: Import UberCart product fields » Support importing UberCart product fields with migrate.module
Project: Migrate » Ubercart
Version: 6.x-1.x-dev » 6.x-2.x-dev

@mikeryan: I don't believe they did -- #3 looks like they're considering it. Not sure what moshe was doing with #4. ;)

@rszrama: No gotchas -- it's pretty obvious. If you use migrate.module and select a node type for the destination that's a UC product node type, the uc_product-specific node fields show up as possible targets for data during the import. That's all there is to it.

moshe weitzman’s picture

my mistake

iamjon’s picture

Subscribing

attiks’s picture

This is working and I believe it's better to add it to Ubercart instead of Migrate, makes more sense to me

frankcarey’s picture

Status: Needs review » Needs work

The Migrate API has been updated. See: http://drupal.org/node/415190

stephenhendry’s picture

Could someone write up a patch and I will do some testing on it?

zkrebs’s picture

Does the above code still work?

Maksym’s picture

There is diferent way to migrate from one shopping cart to UberCart. It's Cart2Cart - shopping cart migration service which allows to migrate products, customers, orders and other data rom any of 19 most popular shopping carts to UberCart and back.
http://www.shopping-cart-migration.com/

verta’s picture

subscribing, also wondering if the inc file is for the dev branch only?

grasmash’s picture

This code worked for me. I don't know the proper way to integrate this, but I just opened migrate/modules/node.migrate.inc and pasted the code at the end. That did the trick.

ermannob’s picture

It worked for me too. Thanks madmatter23

willieseabrook’s picture

longwave’s picture

Status: Needs work » Closed (duplicate)