diff --git a/CHANGE_LOG.txt b/CHANGE_LOG.txt index aebd5df..22d89a8 100644 --- a/CHANGE_LOG.txt +++ b/CHANGE_LOG.txt @@ -1,3 +1,5 @@ +2.0.4 - Fixed: Packeta order now can not be created without pickup point + 2.0.3 - Added: widget v6 integration allows pickup point selection for Germany and other countries - Added: other specific countries price rules - Added: allow specific countries via Packeta carrier configuration diff --git a/Packetery/Checkout/Observer/Sales/OrderPlaceAfter.php b/Packetery/Checkout/Observer/Sales/OrderPlaceAfter.php index fcc04c6..3efe410 100755 --- a/Packetery/Checkout/Observer/Sales/OrderPlaceAfter.php +++ b/Packetery/Checkout/Observer/Sales/OrderPlaceAfter.php @@ -3,6 +3,7 @@ namespace Packetery\Checkout\Observer\Sales; use Magento\Checkout\Model\Session as CheckoutSession; +use Magento\Framework\Exception\InputException; use Packetery\Checkout\Model\Carrier\Config\AllowedMethods; class OrderPlaceAfter implements \Magento\Framework\Event\ObserverInterface @@ -122,6 +123,10 @@ public function execute( } } + if (empty($pointId)) { + throw new InputException(__('You must select pick-up point')); + } + $paymentMethod = $order->getPayment()->getMethod(); $data = [ diff --git a/Packetery/Checkout/etc/module.xml b/Packetery/Checkout/etc/module.xml index 9a3d8fe..a4d9693 100755 --- a/Packetery/Checkout/etc/module.xml +++ b/Packetery/Checkout/etc/module.xml @@ -1,6 +1,6 @@ - + diff --git a/Packetery/Checkout/i18n/cs_CZ.csv b/Packetery/Checkout/i18n/cs_CZ.csv index 6e360fe..582517f 100755 --- a/Packetery/Checkout/i18n/cs_CZ.csv +++ b/Packetery/Checkout/i18n/cs_CZ.csv @@ -56,6 +56,7 @@ "The API key length must have %d characters!","Délka API klíče musí být %d znaků!" "The specified API key is not valid!","Zadaný API klíč není platný !" "Select pick-up point","Vybrat výdejní místo" +"You must select pick-up point","Musíte zvolit výdejní místo" "Method Name","Název metody" "Purchase Date","Datum objednávky" "Title","Název" diff --git a/Packetery/Checkout/i18n/en_GB.csv b/Packetery/Checkout/i18n/en_GB.csv index b87227e..be17a71 100755 --- a/Packetery/Checkout/i18n/en_GB.csv +++ b/Packetery/Checkout/i18n/en_GB.csv @@ -56,6 +56,7 @@ "The API key length must have %d characters!","The API key length must have %d characters!" "The specified API key is not valid!","The specified API key is not valid!" "Select pick-up point","Select pick-up point" +"You must select pick-up point","You must select pick-up point" "Method Name","Method Name" "Purchase Date","Purchase Date" "Title","Title" diff --git a/README.md b/README.md index bfebb3c..378b19e 100755 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ### Download module -[Current version 2.0.3](https://github.com/Zasilkovna/magento2/archive/v2.0.3.zip) +[Current version 2.0.4](https://github.com/Zasilkovna/magento2/archive/v2.0.4.zip) ### Installation @@ -96,7 +96,7 @@ Multiple payment methods can be selected by holding the "Ctrl" button and clicki ### Stažení modulu -[Aktuální verze 2.0.3](https://github.com/Zasilkovna/magento2/archive/v2.0.3.zip) +[Aktuální verze 2.0.4](https://github.com/Zasilkovna/magento2/archive/v2.0.4.zip) ### Instalace