diff --git a/src/Magewire/Locker.php b/src/Magewire/Locker.php index 8b4c5e3..458fb8d 100644 --- a/src/Magewire/Locker.php +++ b/src/Magewire/Locker.php @@ -73,8 +73,11 @@ public function evaluateCompletion(EvaluationResultFactory $resultFactory): Eval } if ($this->locker === null) { - return $resultFactory->createErrorMessageEvent(__('Please select locker')) - ->withCustomEvent('shipping:method:error'); + $errorMessageEvent = $resultFactory->createErrorMessageEvent(__('Please select locker')) + ->withCustomEvent('shipping:method:error') + ->asError(); + return $resultFactory->createValidation('validateInpostLocker') + ->withFailureResult($errorMessageEvent); } $quote = $this->session->getQuote(); diff --git a/src/view/frontend/layout/hyva_checkout_index_index.xml b/src/view/frontend/layout/hyva_checkout_index_index.xml new file mode 100644 index 0000000..ef72ff5 --- /dev/null +++ b/src/view/frontend/layout/hyva_checkout_index_index.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/src/view/frontend/templates/validate-inpost-locker.phtml b/src/view/frontend/templates/validate-inpost-locker.phtml new file mode 100644 index 0000000..d07f622 --- /dev/null +++ b/src/view/frontend/templates/validate-inpost-locker.phtml @@ -0,0 +1,8 @@ +