From 31962a0f21431633318b34666bb389ff49ea0970 Mon Sep 17 00:00:00 2001 From: Joeri van Veen Date: Tue, 27 Jan 2026 09:52:58 +0100 Subject: [PATCH 1/2] fix: preserve original product weight in order --- .../Action/Backend/Order/AbstractOrderAction.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/App/Action/Backend/Order/AbstractOrderAction.php b/src/App/Action/Backend/Order/AbstractOrderAction.php index 1e0b95af9..d730b5977 100644 --- a/src/App/Action/Backend/Order/AbstractOrderAction.php +++ b/src/App/Action/Backend/Order/AbstractOrderAction.php @@ -96,6 +96,21 @@ protected function updateOrders(Request $request): PdkOrderCollection } } + /** + * Merge physicalProperties attribute + */ + if (array_key_exists('physicalProperties', $attributes)) { + if (null !== $attributes['physicalProperties']) { + $attributes['physicalProperties'] = \array_replace_recursive( + $pdkOrder->physicalProperties->toArray(), + $attributes['physicalProperties'] + ); + } else { + // If physicalProperties is explicitly set to null, we should unset it in the PdkOrder. + $attributes['physicalProperties'] = null; + } + } + return $pdkOrder->fill($attributes); }); } From 0f116dc5bbdaed1a58db40efd06ec1ac76289459 Mon Sep 17 00:00:00 2001 From: Joeri van Veen Date: Tue, 27 Jan 2026 10:02:24 +0100 Subject: [PATCH 2/2] fix: preserve original product weight in order --- src/App/Action/Backend/Order/AbstractOrderAction.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/App/Action/Backend/Order/AbstractOrderAction.php b/src/App/Action/Backend/Order/AbstractOrderAction.php index d730b5977..afc88e8e1 100644 --- a/src/App/Action/Backend/Order/AbstractOrderAction.php +++ b/src/App/Action/Backend/Order/AbstractOrderAction.php @@ -105,9 +105,6 @@ protected function updateOrders(Request $request): PdkOrderCollection $pdkOrder->physicalProperties->toArray(), $attributes['physicalProperties'] ); - } else { - // If physicalProperties is explicitly set to null, we should unset it in the PdkOrder. - $attributes['physicalProperties'] = null; } }