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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nwpullman2 created an issue. See original summary.

periksson’s picture

Patch flying in

periksson’s picture

Status: Active » Needs review
periksson’s picture

FileSize
3.25 KB

Missed a method in my first patch, commerce_shipping_update_line_item(). Attaching a complete patch this time.

donquixote’s picture

We are applying shipping fees to the order in many more places than the checkout form.

Can 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()?