How to add programmatically new order status and state using Data Patch in Magento 2?

To create new order status and state follow below steps: Create folder Setup/Patch/Data in your module Create file UpdateOrderStatuses.php Implement method apply in the class UpdateOrderStatuses Run bin/magento setup:upgrade When you run Upgrade command, Magento runs your patch and it […]

How to display “Free” for product with $0.00 price in Magento 2

Going to use the Around plugin to change $0.00 to as “Free” text. You can follow below steps to get it done: For PLP and PDP, you can replace your module name as per given exapmle app/code/MM/Training/etc/frontend/di.xml app/code/MM/Training/Plugin/Pricing/Render/PriceBox.php Just flush […]

How to create or drop a foreign key and add Index in the table in Magento 2?

Part 4: Last part to this series post of database operation, we are going to cover in this post How to create or drop a foreign key and add index in the table? Create a foreign key and add an […]

Page 2 of 5
1 2 3 4 5