From 4e5b94312fbcd4cf86613761c17d859dd3a8ad1b Mon Sep 17 00:00:00 2001 From: fmsthird Date: Fri, 1 Sep 2023 14:26:45 +0800 Subject: [PATCH 1/2] Hotfix: add empty label catch - display an error message when no shipment is found - fix menu item text format/casing --- Controller/Adminhtml/Order/PrintLabelAndPackingSlips.php | 4 ++-- view/adminhtml/ui_component/sales_order_grid.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Controller/Adminhtml/Order/PrintLabelAndPackingSlips.php b/Controller/Adminhtml/Order/PrintLabelAndPackingSlips.php index 4083a8b..61f8761 100644 --- a/Controller/Adminhtml/Order/PrintLabelAndPackingSlips.php +++ b/Controller/Adminhtml/Order/PrintLabelAndPackingSlips.php @@ -124,9 +124,9 @@ public function execute() } } - if (empty($this->orderIds)) { + if (empty($this->orderIds) || empty($this->labels)) { $this->messageManager->addErrorMessage( - __('No pdf generated. Trunkrs shipment not found.') + __('No document generated. Trunkrs shipment not found.') ); return $this->_redirect($this->_redirect->getRefererUrl()); } diff --git a/view/adminhtml/ui_component/sales_order_grid.xml b/view/adminhtml/ui_component/sales_order_grid.xml index 4ad7ef6..1fea42a 100644 --- a/view/adminhtml/ui_component/sales_order_grid.xml +++ b/view/adminhtml/ui_component/sales_order_grid.xml @@ -6,7 +6,7 @@ trunkrs_print_shipping_label_and_packing_slips - + From 3e470b22870397f87d1cd373b41aea5f9a42b37f Mon Sep 17 00:00:00 2001 From: fmsthird Date: Fri, 1 Sep 2023 14:27:43 +0800 Subject: [PATCH 2/2] increment plugin version --- composer.json | 2 +- etc/module.xml | 2 +- view/adminhtml/templates/system/config/trunkrs.phtml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 4e540cb..9363de7 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "trunkrs magento 2 shipping method" ], "type": "magento2-module", - "version": "2.3.0", + "version": "2.3.1", "license": [ "MIT" ], diff --git a/etc/module.xml b/etc/module.xml index 3e47afc..f9ca1ce 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,7 +1,7 @@ - + diff --git a/view/adminhtml/templates/system/config/trunkrs.phtml b/view/adminhtml/templates/system/config/trunkrs.phtml index d292f96..4864935 100644 --- a/view/adminhtml/templates/system/config/trunkrs.phtml +++ b/view/adminhtml/templates/system/config/trunkrs.phtml @@ -31,7 +31,7 @@ echo "
"; 'browserInfo' => $_SERVER['HTTP_USER_AGENT'], 'phpVersion' => phpversion(), 'phpExtensions' => get_loaded_extensions(), - 'pluginVersion' => 'v2.3.0' + 'pluginVersion' => 'v2.3.1' ], 'disableAutoShipment' => $block->getDisableAutoShipment() ]);