How to add custom validation on checkout page before shipping method rendering and if validation success then only show shipping methods or else show error message.

I have already implemented this but using preference shipping.php overriding the issue is that it is calling for each shipping method (degrading module efficiency and message is showing on other page not on same checkout page)

Here is my git repo on dev branch


also i am applying some validation on product attributes and shipping address's country code

see in my model/shipping/shipping.php file

  • solved by my self overrided core's files to list only my desired shipping methods into my module Jul 23, 2019 at 11:04


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.