How to compress sales PDF size in Magento 2

Hello folks, welcome back to my new article about compress sales PDF file size. In default Magento, sales pdf size is approximately 3.2 MB. We can reduce the size to 3.5 KB only by changing the fonts of pdf. So you just need to override Magento pdf class for the invoice, shipment, and credit memo…

Continue Reading How to compress sales PDF size in Magento 2

How to show source in shipment grid Magento 2 MSI

Hello Guys! Welcome back to another topic. Today I will show you how we can show supply source in shipment grid. With default Magento we can see Shipment number, Ship Date, Order, Order Date, Total Quantity etc. in shipment grid. To show the source of shipment we need to join inventory_shipment_source table to shipment grid…

Continue Reading How to show source in shipment grid Magento 2 MSI

How to Create Shipment Programmatically with Source Selection MSI Magento 2

Hello Guys! Welcome back to my blog. There are many tutorials and stack Exchange answers available for programmatically create a shipment in Magento 2. But today in this article I'll talk about how we can programmatically create a shipment in multi stock inventory MSI in Magento 2. For MSI we need to assign a source…

Continue Reading How to Create Shipment Programmatically with Source Selection MSI Magento 2

How to Add Custom Mass Action in Order Grid in Magento 2

Welcome back Magento Folks to my blog. In this article, I will show you how we can add new custom mass action to the order grid. The default Magento provides mass action like Cancel, Print, Delete, etc. We can easily add new mass action with UI components by two simple steps. Create sales_order_grid.xml in custom…

Continue Reading How to Add Custom Mass Action in Order Grid in Magento 2

Get order id by increment id Magento 2

In this article, I will show you how you can load order by increment id in Magento 2 We can use the order interface Magento\Sales\Api\Data\OrderInterface to load order by increment id. By Object Manager: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $incrementId = "100009633"; $orderInterface = $objectManager->create('Magento\Sales\Api\Data\OrderInterface'); $order = $orderInterface->loadByIncrementId($incrementId); // Print Order Object print_r($order->debug()); // Get Order Id…

Continue Reading Get order id by increment id Magento 2