maybe you need to remove old file or maybe you need to do this frequently so how we can do it. if you are using the Linux as OS it will be easy for you just use below command : this command will remove files older then 1 week or 168 hours (7*24) if you…
Magento 2 add configuration link In menu
How can we create a menu link to our configuration section? Adding a configuration link In menu is too easy. Just do like this: create a menu xml file under the etc/adminhtml directory and put below code inside it.
there are no source item with the in stock status
Whenever we will upgrade Magento 2.3.X version to Magento 2.4.3 at that time Multi Source Inventory Issue happens. To solve that issue need to follow below steps. Step #1 First Disable all MSI extension Step #2 di compile the Magento codes Step #3 Check will inventory_source_item and inventory_source_stock_link table removed Step #4: Enable all MSI…
Magento problems during upgrade from version 2.3.7 to 2.4
Root composer.json requires friendsofphp/php-cs-fixer ~2.14.0 -> satisfiable by friendsofphp/php-cs-fixer[v2.14.0 … solution : run this command composer require magento/composer-root-update-plugin=~1.0 –no-update open composer.json and change riendsofphp/php-cs-fixer from ‘~2.xx.x’ to ‘~2.16.0’ execute this command ‘composer update’ Root composer.json requires allure-framework/allure-phpunit ~1.2.0 -> satisfiable by allure-framework/allure-phpunit[1.2.0 … open composer.json and change allure-framework/allure-phpunit from ‘~1.2.0’ to ‘~1.4.0’ execute this command…
How to execute theĀ Magento command on phpstorm
As you know PhpStorm is one of the best IDEs for coding. Being fast is one of the important things that any Magento developer should consider. To this purpose I wanna show you how we can run Magento commands by phpstorm without writing the command in cli. Flow me step by step : 1- add…
Showing products just on the product page
There are two ways to show a product just on the product page without showing it on the category page or search page. remove all categories from the product use my module Show a product just on the product page by removing all categories it is too easy but let me do it step by…
Magento 2 Elasticsearch crashed after a while
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…
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…