Can't map to product_id and update existing products

Created on 21 August 2015, almost 10 years ago
Updated 4 May 2025, 2 months ago

So I'm trying to update a field on pre-existing products (commerce product entities) in a site. In the world of nodes you can do this by mapping to the node ID (nid) and setting $this->systemOfRecord = Migration::DESTINATION;.

But, with commerce_migrate and MigrateDestinationCommerceProduct as my destination there's no "product_id" destination field to map to.

Looking at migrate's MigrateDestinationNode class they seem to build this functionality in:
http://cgit.drupalcode.org/migrate/tree/plugins/destinations/node.inc#n63
http://cgit.drupalcode.org/migrate/tree/plugins/destinations/node.inc#n160

Same goes for terms:
http://cgit.drupalcode.org/migrate/tree/plugins/destinations/term.inc#n73
http://cgit.drupalcode.org/migrate/tree/plugins/destinations/term.inc#n158

I'd suggest we build in "product_id" as a destination field so we can update existing products just like we can do with nodes, terms, comments, etc.

Patch likely coming soon...

✨ Feature request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States chrisolof

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024