Support importing UberCart product fields with migrate.module

dww - November 2, 2009 - 09:29
Project:Ubercart
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:dww
Status:needs review
Description

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?

AttachmentSize
uc_product.inc_.txt1.15 KB

#1

dww - November 2, 2009 - 09:32

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.

#2

dww - November 2, 2009 - 19:09
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.

#3

rszrama - November 2, 2009 - 20:02

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

#4

moshe weitzman - November 2, 2009 - 22:50
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 :)

#5

mikeryan - November 6, 2009 - 21:15

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...

#6

dww - November 6, 2009 - 21:46
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.

#7

moshe weitzman - November 6, 2009 - 21:49

my mistake

 
 

Drupal is a registered trademark of Dries Buytaert.