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.
Hello,
We are applying shipping fees to the order in many more places than the checkout form. As a result of this, every time we do this the line item is deleted and then recreated, as designed inside commerce_shipping_rate_apply().
This patch is to make sure line items are always reused, to allow for more ajax-based interaction with the user in future versions of this module, and to at the same time save line item ids.
Comment | File | Size | Author |
---|---|---|---|
#4 | reuse_shipping_line_items-2621478-4.patch | 3.25 KB | periksson |
Comments
Comment #2
periksson CreditAttribution: periksson commentedPatch flying in
Comment #3
periksson CreditAttribution: periksson commentedComment #4
periksson CreditAttribution: periksson commentedMissed a method in my first patch, commerce_shipping_update_line_item(). Attaching a complete patch this time.
Comment #5
donquixote CreditAttribution: donquixote commentedCan you name some such situations other than checkout?
It depends on rules config, right? And every such case would be a call to commerce_shipping_rate_apply()?