This is the official Magento 2 extension for the logistics company PostNL. Add shipping options and parcelshops to your checkout. Create labels with track and trace functionality from the backend.
59
stars
60
forks
source link
[QUESTION] What is the reason that price for Extra Cover are not fetched from order table? #358
Question
Is there a special reason why prices are loaded from the product repo for Extra Cover instead of getting them from the already loaded Order\Item object?
Question Is there a special reason why prices are loaded from the product repo for Extra Cover instead of getting them from the already loaded Order\Item object?
See: https://github.com/tig-nl/postnl-magento2/blob/a0c1e70bc82de4856d21ecef3f244ef63b3820d4/Model/Shipment.php#L831-L833
And: https://github.com/tig-nl/postnl-magento2/blob/a0c1e70bc82de4856d21ecef3f244ef63b3820d4/Model/Shipment.php#L874-L878
As price should be available using $orderItem->getPrice() Think this will have some performance gain.