-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: SalesFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch

Description
Preconditions
M 2.3.3
Steps to reproduce
- The method
getPrice()
from/vendor/magento/module-sales/Model/Order/Item.php
/**
* Return price
*
* @return float|null
*/
public function getPrice()
{
return $this->getData(OrderItemInterface::PRICE);
}
Expected result
Clearly states it should return a float, or null.
Actual result
However, when creating a MOTO order, and you set a custom price for a product, when you call getPrice()
for the order items, the returned value will be a string, not a float.
We switched to getBasePrice()
(seemingly operates the same as getPrice()
....) as that should also return a float, or null. It worked fine locally, but had a report that on Magento Cloud, it would return a string.
Metadata
Metadata
Assignees
Labels
Component: SalesFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch