Skip to content

Commit 69848db

Browse files
mslabkokeharper
andauthored
MC-32201: Reorder functionality
Co-Authored-By: Kevin Harper <keharper@users.noreply.github.com>
1 parent ef33424 commit 69848db

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/code/Magento/Sales/Model/Reorder/Reorder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ class Reorder
3636
* List of error messages and codes.
3737
*/
3838
private const MESSAGE_CODES = [
39-
'Product that you are trying to add is not available' => self::ERROR_NOT_SALABLE,
39+
'The product that you are trying to add is not available' => self::ERROR_NOT_SALABLE,
4040
'The fewest you may purchase is' => self::ERROR_INSUFFICIENT_STOCK,
4141
'The most you may purchase is' => self::ERROR_INSUFFICIENT_STOCK,
42-
'The requested qty is not available' => self::ERROR_INSUFFICIENT_STOCK,
42+
'The requested quantity is not available' => self::ERROR_INSUFFICIENT_STOCK,
4343
];
4444

4545
/**
@@ -125,7 +125,7 @@ public function execute(string $orderNumber, string $storeId): Data\ReorderOutpu
125125

126126
$cart = $this->customerCartProvider->resolve($customerId);
127127
if (!$this->reorderHelper->canReorder($order->getId())) {
128-
$this->addError((string)__('Reorder is not available.'), self::ERROR_REORDER_NOT_AVAILABLE);
128+
$this->addError((string)__('Reorders are not allowed.'), self::ERROR_REORDER_NOT_AVAILABLE);
129129
return $this->prepareOutput($cart);
130130
}
131131

app/code/Magento/SalesGraphQl/etc/schema.graphqls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type ReorderItemsOutput {
2929

3030
type CheckoutUserInputError @doc(description:"An error encountered while adding an item the the cart."){
3131
message: String! @doc(description: "Localized error message")
32-
path: [String]! @doc(description: "Path to the input field which caused an error. Similar to how GraphQL specification defines path for errors in query: http://spec.graphql.org/draft/#sec-Errors")
32+
path: [String]! @doc(description: "Path to the input field that caused an error. See the GraphQL specification about path errors for details: http://spec.graphql.org/draft/#sec-Errors")
3333
code: CheckoutUserInputErrorCodes! @doc(description: "Checkout-specific error code")
3434
}
3535

0 commit comments

Comments
 (0)