It’s a common issue with Magento 2 , after a while Elasticsearch will crashed if it could not find enuaf RAM. Why this should happen? when ES started it try to use all RAM to save it data. all thing will be okay but when Apache or PHP needs to more RAM based on their…
Category: magento
Magento 2 add condition to load COD (cash on delivery)
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…
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…
how to check varnish cache is enabled on Magento 2
here is 3 way to check the varnish cache is enable or not. Check varnish cache is enabled by website this website helps you to check it https://isvarnishworking.uk/. just put your website URL and push the check botton check varnish cache is enable by header open your bash or terminal and run belove command: As…
change default ui component filter search in magento
here is a good code to change the default ui component filter that i wanna shear it with you. you can change it as you wish. put it in collection class.
How do I make Git ignore file mode (chmod) changes?
it;s too easy just use below command after this the git will ignore file mode changes.
An exception was raised while creating “Request”; no instance returned in Magento 2
I get error An exception was raised while creating “Request”; no instance returned when I want to use the di compile command, that I test another command and I saw I have the error for all commands. How we can fix An exception was raised while creating “Request”; no instance returned I know it’s because…
Fatal error: Uncaught Error: Call to undefined function xdebug_disable() in Magento 2
How we can fix Fatal error: Uncaught Error: Call to undefined function xdebug_disable() error? it can be happen when you want to install xdebug. you can simple remove xdebug and all thing worked perfectly or not you can change Magento core code. find vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/_bootstrap.php file and, find below codes Now, you can change the code…
Magento 2 remove the version number from url
It’s a good Magento feature that sometimes disturbed Magento developers. If you get a 404 error or cache clean does not work, etc. I want to show you all way that we can remove the version number from Magento URL. remove Magento version number by PHPMyAdmin open the phpmyadmin and select you Magento database. find…