Closed
Description
Preconditions (*)
- Magento 2.3-develop
Steps to reproduce (*)
- After I pulled 2.3-dev brunch to my code, this commit effected creating new order shipment.
- after creating new shipment and exec $_shipment->getAllTracks()
in https://example.com/admin_xxxxx/admin/order_shipment/view/shipment_id/382
after tick Notify Customer by Email and click save
the customer receive email with all my tracking number - also if the order converted to shipment \Magento\Sales\Model\Convert\Order->toShipment($order);
then $shipment->getAllTracks() will return all trackers
Expected result (*)
- return trackers if they already exist or empty array if not exist
Actual result (*)
my temporary fix that work
1- in app/code/Magento/Sales/view/frontend/templates/email/shipment/track.phtml
<?php $_shipment = $block->getShipment() ?>
// my fix
<?php $_shipment->getTracksCollection()->addFieldToFilter('parent_id',array('eq' =>$_shipment->getId())); ?>
- in Controller/Adminhtml/Order/Pdfshipments.php
$convertOrder = $objectManager->create('Magento\Sales\Model\Convert\Order');
$shipment = $convertOrder->toShipment($order);
// fix the issue after convert get all shipment trackers
$shipment->getTracksCollection()->addFieldToFilter('parent_id',array('eq' =>$shipment->getId()));
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.2 release lineThe issue has been fixed in 2.3 release lineGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.3 release