Closed
Description
Preconditions (*)
- Magento CE 2.2.6 without sample data is installed
- PHP 7.0.1
Steps to reproduce (*)
- PUT REQUEST
- http://magento.host/rest/V1/carts/mine
- in the cart you must add a reserved_order_id (for example: 000000653)
Expected result (*)
Update the cart with a reserved order number with the left pad 0 eg: 000000651
Actual result (*)
Can not update cart with a reserved order number
My temporary solution
in the file CartInterface.php
There is a typing error Doctrine
The type should be a string of characters and not integer
/**
* Returns the reserved order ID for the cart.
*
* @return int|null Reserved order ID. Otherwise, null.
*/
public function getReservedOrderId();
/**
* Sets the reserved order ID for the cart.
*
* @param int $reservedOrderId
* @return $this
*/
public function setReservedOrderId($reservedOrderId);
We must replace the comments Doctrine by here
/**
* Returns the reserved order ID for the cart.
*
* @return string|null Reserved order ID. Otherwise, null.
*/
public function getReservedOrderId();
/**
* Sets the reserved order ID for the cart.
*
* @param string $reservedOrderId
* @return $this
*/
public function setReservedOrderId($reservedOrderId);
I make the patch with the following SED command
cat vendor/magento/module-quote/Api/Data/CartInterface.php" | sed -e "s/int\|null Reserved order ID/string\|null Reserved order ID/g" -e "s/int \$reservedOrderId/string \$reservedOrderId/g"
Metadata
Metadata
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.2 releaseThe issue has been reproduced on latest 2.3 release