Shipment Tracking URL for different Carrier Provider (FedEx, DHL, UPS, USPS) Magento 2.

Shipment Tracking URL used for tracking your items. Your item’s current location, expected arrival date and more info you can find out from Shipment Tracking number only.

Each Carrier has its specific URL to track items. Continue reading “Shipment Tracking URL for different Carrier Provider (FedEx, DHL, UPS, USPS) Magento 2.”

Get Shipment data by order increment id Magento 2.

You can get the Shipment collection for the specific order by order increment id in Magento 2.

Using Magento\Sales\Api\ShipmentRepositoryInterface interface, you need to use getList() function to fetch no. of Shipment by sales order increment id.

When you check the sales_shipment table, one field order_id is available in sales_shipment table so you first fetch the order id from the order increment id. Continue reading “Get Shipment data by order increment id Magento 2.”

Get Shipment collection details by order id Magento 2.

You can get the Shipment data or collection for the specific order by order id in Magento 2.

Using Magento\Sales\Api\ShipmentRepositoryInterface interface, you need to use getList() function to fetch no. of Shipment by sales order id.

Using SearchCriteriaBuilder Class, You need to use addFilter() method, filter by order id and pass searchCriteria object to getList() method of ShipmentRepositoryInterface. Continue reading “Get Shipment collection details by order id Magento 2.”