1

I have an observer that rejects this save of orders conditionally and throws a message. Instead of the message I would like to trigger a modal. How can I get this done?

$message = “We were unable to verify your age.”;
throw new \Magento\Framework\Exception\CouldNotSaveException(__($message));
return;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.