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 |
Jump to:
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?
| Attachment | Size |
|---|---|
| uc_product.inc_.txt | 1.15 KB |

#1
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
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
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
Seems small enough that we should be able to commit it if they disown it :)
#5
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
@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
my mistake