Sometime we need to have a condition to enable or disable COD (cash on delivery payment). In my case my client asked me COD should be enable just for some regions. Now i want to share my code and my solution . Create this file or if it exist just add the code app/code/Darvishani/COD/etc/di.xml Now…
Month: December 2021
Cash on delivery error Uncaught TypeError: Unable to process binding “html: function(){return getInstructions() }” ( Magento 2 )
This is my today bug after adding some condition to disable or enable cash on delivery payment. Why this happen? When you add a condition to load COD payment it will loaded after page load and because that JS does not have COD config. Then we need to remove Instructions from html template. 1: create…
Redirect controller to custom URL or previous page
After saving data always you need to redirect to custom URL or sometime to previous page. so in this article I want to share a pace of redirect cod. Assume your controller name is Test and your action is name Index. AS you know we have a class to each action. How about when you…