Page MenuHomeIn-Portal Phabricator

D164.diff
No OneTemporary

File Metadata

Created
Mon, Jan 6, 6:48 AM

D164.diff

Index: branches/5.2.x/units/shipping/shipping_tag_processor.php
===================================================================
--- branches/5.2.x/units/shipping/shipping_tag_processor.php
+++ branches/5.2.x/units/shipping/shipping_tag_processor.php
@@ -235,9 +235,14 @@
{
$original_shipping = $original_shipping[$package_id];
$key = $original_shipping['ShippingId'];
- $shipping_types[$key]['TotalCost'] = $this->Application->isAdminUser ? $original_shipping['TotalCost'] : $shipping_types[$key]['TotalCost'];
- $shipping_types[$key]['ShippingName'] = $this->Application->isAdminUser ? 'Original: '.$original_shipping['ShippingName'] : $shipping_types[$key]['ShippingName'];
- $shipping_types[$key]['ShippingId'] = $key;
+
+ // When changing shipping type (via dropdown), then prefer current order's actual
+ // shipping info over one from Shipping Quote Engines.
+ if ( $this->Application->isAdminUser ) {
+ $shipping_types[$key] = $original_shipping;
+ $shipping_types[$key]['ShippingName'] = 'Original: ' . $original_shipping['ShippingName'];
+ }
+
$selected_id = $key;
}

Event Timeline