diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 5738937..09f7861 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -1,7 +1,7 @@ $result['width']) ? $result['width'] = $d['width'] : ''; + //find the maximum items height ($d['height'] > $result['height']) ? $result['height'] = $d['height'] : ''; - $result['length'] += $d['length']; + + //find the longest horizontal side (either length or width) - used as the package length + $length = max($d['length'], $d['width']); + ($length > $result['length']) ? $result['length'] = $length : ''; + + //sum the shorter horizontal side if items are laid in a row + $width = min($d['length'], $d['width']); + $result['width'] += $width; } $result['volume'] = $result['length'] * $result['height'] * $result['width']; diff --git a/Model/AbstractCarrier.php b/Model/AbstractCarrier.php index 6447009..e38d354 100644 --- a/Model/AbstractCarrier.php +++ b/Model/AbstractCarrier.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/AbstractClient.php b/Model/AbstractClient.php index b25c0bf..774424f 100644 --- a/Model/AbstractClient.php +++ b/Model/AbstractClient.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/AbstractService.php b/Model/AbstractService.php index 197f7ac..8548cad 100644 --- a/Model/AbstractService.php +++ b/Model/AbstractService.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/Carrier.php b/Model/Carrier.php index dc4bdcd..dbfd374 100644 --- a/Model/Carrier.php +++ b/Model/Carrier.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/CarrierManager.php b/Model/CarrierManager.php index 2c7bdf2..566c5a3 100644 --- a/Model/CarrierManager.php +++ b/Model/CarrierManager.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/Client.php b/Model/Client.php index 44d8ce6..99c8262 100644 --- a/Model/Client.php +++ b/Model/Client.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/Cron/Autoship.php b/Model/Cron/Autoship.php index 49df22d..20fbb79 100644 --- a/Model/Cron/Autoship.php +++ b/Model/Cron/Autoship.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/Estimate/Time.php b/Model/Estimate/Time.php index 8b0e5e7..c26679e 100644 --- a/Model/Estimate/Time.php +++ b/Model/Estimate/Time.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/Point.php b/Model/Point.php index 5cd1c46..394ed8b 100644 --- a/Model/Point.php +++ b/Model/Point.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/Point/DataProvider.php b/Model/Point/DataProvider.php index b859be7..f294ab4 100644 --- a/Model/Point/DataProvider.php +++ b/Model/Point/DataProvider.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/PointManager.php b/Model/PointManager.php index 88a4c74..76f694c 100644 --- a/Model/PointManager.php +++ b/Model/PointManager.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/PointRepository.php b/Model/PointRepository.php index 928093c..e9c0c0f 100644 --- a/Model/PointRepository.php +++ b/Model/PointRepository.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/ResourceModel/Point.php b/Model/ResourceModel/Point.php index bcd3341..eaa0f32 100644 --- a/Model/ResourceModel/Point.php +++ b/Model/ResourceModel/Point.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/ResourceModel/Point/Collection.php b/Model/ResourceModel/Point/Collection.php index 690c8b3..d420f5b 100644 --- a/Model/ResourceModel/Point/Collection.php +++ b/Model/ResourceModel/Point/Collection.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/ResourceModel/Point/Grid/Collection.php b/Model/ResourceModel/Point/Grid/Collection.php index 28c06f3..9ab8f01 100644 --- a/Model/ResourceModel/Point/Grid/Collection.php +++ b/Model/ResourceModel/Point/Grid/Collection.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/Service.php b/Model/Service.php index 5d3b5cc..a65ed2d 100644 --- a/Model/Service.php +++ b/Model/Service.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/Service/CalculateRequest.php b/Model/Service/CalculateRequest.php index 77389bf..9d14015 100644 --- a/Model/Service/CalculateRequest.php +++ b/Model/Service/CalculateRequest.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/Service/CalculateResult.php b/Model/Service/CalculateResult.php index 43c7313..f9c8328 100644 --- a/Model/Service/CalculateResult.php +++ b/Model/Service/CalculateResult.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/Service/Tracking.php b/Model/Service/Tracking.php index 026fe82..03a6d84 100644 --- a/Model/Service/Tracking.php +++ b/Model/Service/Tracking.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/Source/Dimensionunits.php b/Model/Source/Dimensionunits.php index e6ee948..8c88e38 100644 --- a/Model/Source/Dimensionunits.php +++ b/Model/Source/Dimensionunits.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/Source/PointType.php b/Model/Source/PointType.php index be8f15c..fb8847b 100644 --- a/Model/Source/PointType.php +++ b/Model/Source/PointType.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Model/Source/Weightunits.php b/Model/Source/Weightunits.php index 00f2f49..72aa556 100644 --- a/Model/Source/Weightunits.php +++ b/Model/Source/Weightunits.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Observer/CollectTotals.php b/Observer/CollectTotals.php index 939e563..d3fa2a5 100644 --- a/Observer/CollectTotals.php +++ b/Observer/CollectTotals.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Observer/CreateOrder.php b/Observer/CreateOrder.php index b0c6ef8..808635f 100644 --- a/Observer/CreateOrder.php +++ b/Observer/CreateOrder.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Observer/QuoteSubmitBefore.php b/Observer/QuoteSubmitBefore.php index bad9068..094b4ab 100644 --- a/Observer/QuoteSubmitBefore.php +++ b/Observer/QuoteSubmitBefore.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Plugin/ExtShippingMethodManagement.php b/Plugin/ExtShippingMethodManagement.php index 8844235..87342f0 100644 --- a/Plugin/ExtShippingMethodManagement.php +++ b/Plugin/ExtShippingMethodManagement.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Plugin/OrderGet.php b/Plugin/OrderGet.php index c6129d5..2524741 100644 --- a/Plugin/OrderGet.php +++ b/Plugin/OrderGet.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Plugin/QuoteRate.php b/Plugin/QuoteRate.php index 925c6c9..a977d5b 100644 --- a/Plugin/QuoteRate.php +++ b/Plugin/QuoteRate.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Plugin/ShippingAddressManagement.php b/Plugin/ShippingAddressManagement.php index 5335551..50fb248 100644 --- a/Plugin/ShippingAddressManagement.php +++ b/Plugin/ShippingAddressManagement.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/Plugin/ToOrderAddress.php b/Plugin/ToOrderAddress.php index d6b0110..42ece34 100644 --- a/Plugin/ToOrderAddress.php +++ b/Plugin/ToOrderAddress.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */ diff --git a/etc/module.xml b/etc/module.xml index 20c9093..caf14f4 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -2,7 +2,7 @@ diff --git a/registration.php b/registration.php index 3baf4fe..ecbd9c2 100644 --- a/registration.php +++ b/registration.php @@ -2,7 +2,7 @@ /** * @author Mygento Team - * @copyright 2016-2024 Mygento (https://www.mygento.ru) + * @copyright 2016-2025 Mygento (https://www.mygento.com) * @package Mygento_Shipment */