- @j_ten_man opened merge request.
- πΊπΈUnited States jim_b
The patch files from this issue's fork no longer work with commerce_migrate v3.2.1 or v3.2.x-dev after the update on 9 Jul 2023.
(The v3.2.x-dev before 9 Jul 2023 would allow these patches to apply.) - last update
over 1 year ago Composer require failure - @mradcliffe opened merge request.
- last update
over 1 year ago 350 pass, 3 fail - πΊπΈUnited States karlshea Minneapolis πΊπΈ
Just to be helpful to others, as of today MR !13 is support for coupon migrations on 4.0.x on top of the patch at https://www.drupal.org/project/commerce_migrate/issues/2905242#comment-1... π Migrate discount and discount_offer Needs review
- πΊπΈUnited States makbeta
I'm attempting to use/test this solution. The coupon and discount migration seems to work just fine. However, I don't get the `upgrade_commerce1_coupon_usage` as an available migration. I see the YML file and it seems to be checking out, but for some reason the migration not being included into the list.
My D7 site was configured to use coupons and discounts. I'm wondering if I need to do something to enable this migration or if certain criteria needs to be met for this migration to register.Any input on this will be greatly appreciated.
- πΊπΈUnited States makbeta
Looks like the migration of coupon usage relies on Coupon Usage module (data in the database table
commerce_coupon_usage_transaction
), which is not something I have in my case. Coupons can be associated with an order in D7 without the Coupon Usage module. The module can be enabled in D7, but the historical data is then not populated.
During the migration to D9, the discount is migrated by the coupon information is not migrated into the coupon field. The order to coupon association can be read from another tablefield_data_commerce_coupons
, which is not handled by this specific solution, but can be extended. - π«π·France paulbeaney
Just managed to get all this up and running with a bit of tweaking for my specific scenario, but there does seem to be one basic problem: this migration re-uses the Promotion Usage destination plugin, but said plugin sets the coupon_id to zero in the import() function. I ended up just tweaking the function to this so that the Coupon Usage migration can supply the value for coupon_id:
public function import(Row $row, array $old_destination_id_values = []) { $success = FALSE; $values = ['usage_id' => 0] + $row->getDestination(); ...