Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
uc_product.inc_.txt | 1.15 KB | dww |
Comments
Comment #1
dwwI 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.
Comment #2
dwwMoshe 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.
Comment #3
rszrama CreditAttribution: rszrama commentedI 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
Comment #4
moshe weitzman CreditAttribution: moshe weitzman commentedSeems small enough that we should be able to commit it if they disown it :)
Comment #5
mikeryanDid 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...
Comment #6
dww@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.
Comment #7
moshe weitzman CreditAttribution: moshe weitzman commentedmy mistake
Comment #8
iamjon CreditAttribution: iamjon commentedSubscribing
Comment #9
attiks CreditAttribution: attiks commentedThis is working and I believe it's better to add it to Ubercart instead of Migrate, makes more sense to me
Comment #10
frankcarey CreditAttribution: frankcarey commentedThe Migrate API has been updated. See: http://drupal.org/node/415190
Comment #11
stephenhendry CreditAttribution: stephenhendry commentedCould someone write up a patch and I will do some testing on it?
Comment #12
zkrebs CreditAttribution: zkrebs commentedDoes the above code still work?
Comment #13
Maksym CreditAttribution: Maksym commentedThere 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/
Comment #14
verta CreditAttribution: verta commentedsubscribing, also wondering if the inc file is for the dev branch only?
Comment #15
grasmash CreditAttribution: grasmash commentedThis 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.
Comment #16
ermannob CreditAttribution: ermannob commentedIt worked for me too. Thanks madmatter23
Comment #17
willieseabrook CreditAttribution: willieseabrook commentedSee #850180: Ubercart + Migrate Module - Working module attached.
Comment #18
longwaveClosing as duplicate of #850180: Ubercart + Migrate Module - Working module attached.