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.
The adjustments field is unused, we can remove it, along with the related methods and interface.
(We initially thought that taxes & promotions would be added directly to the relevant shipment, but they will be added to the order instead).
Comment | File | Size | Author |
---|---|---|---|
#10 | 2865542-fix-update-8200.patch | 553 bytes | a.dmitriiev |
#4 | remove_shipping_adjustments_field-2865542-4.patch | 6.11 KB | vasike |
Comments
Comment #2
vasikehere is patch for this.
Are there other changes (related) needed for this issue?
p.s.: btw, isn't a similar issue for Commerce core Order item entity?
Comment #3
bojanz CreditAttribution: bojanz at Centarro commentedWe're missing an update hook (hook_update) that will remove the adjustments field on existing sites.
Comment #4
vasikeofcourse
here is a new patch with the update hook
Comment #6
bojanz CreditAttribution: bojanz at Centarro commentedImproved the update function and committed. Thanks!
Comment #8
finneHa! I have a use case where invoices are sent per shipment, and therefor taxes and promotions need to be calculated per shipment. I think I need shipment adjustments :-)
I might want to use the removed code here.
Comment #9
bojanz CreditAttribution: bojanz at Centarro commentedYou probably don't.
All you need to do is ensure your taxes and promotions are calculated per order item, and you're good to go. A shipment just bundles order items.
Comment #10
a.dmitriiev CreditAttribution: a.dmitriiev as a volunteer and at 1xINTERNET commentedI had really old installation and updating now caused the error because update 8200 doesn't state the name of the field to update. The original patch from #2 and #4 was doing it properly, but commit https://www.drupal.org/commitlog/commit/18412/5d6860ede48a225bf1400882fb... has lost the name.
Attaching the patch here and not in a new issue, because I think nobody else will need such an "old" update.