Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding the sku in error message about sku with no associated stock #3356

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion InventoryConfiguration/Model/GetStockItemConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function execute(string $sku, int $stockId): StockItemConfigurationInterf
&& true === $this->isSourceItemManagementAllowedForSku->execute($sku)
&& false === $this->isProductAssignedToStock->execute($sku, $stockId)) {
throw new SkuIsNotAssignedToStockException(
__('The requested sku is not assigned to given stock.')
__('The requested sku %1 is not assigned to given stock.', $sku)
);
}

Expand Down
1 change: 1 addition & 0 deletions InventoryConfiguration/i18n/en_US.csv
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
"The requested sku is not assigned to given stock.","The requested sku is not assigned to given stock."
"The requested sku %1 is not assigned to given stock.","The requested sku %1 is not assigned to given stock."
2 changes: 1 addition & 1 deletion InventoryExportStock/Model/PreciseExportStockProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private function getItem(string $sku, int $stockId): array
];
}
if (!$this->isProductAssignedToStock->execute($sku, $stockId)) {
throw new SkuIsNotAssignedToStockException(__('The requested sku is not assigned to given stock.'));
throw new SkuIsNotAssignedToStockException(__('The requested sku %1 is not assigned to given stock.', $sku));
}

$result = $this->areProductsSalable->execute([$sku], $stockId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function execute(string $sku, int $stockId, float $requestedQty): Product
$errors = [
$this->productSalabilityErrorFactory->create([
'code' => 'requested-sku-is-not-assigned-to-given-stock',
'message' => __('The requested sku is not assigned to given stock.')
'message' => __('The requested sku %1 is not assigned to given stock.', $sku)
])
];
return $this->productSalableResultFactory->create(['errors' => $errors]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function execute(string $sku, int $stockId, float $requestedQty): Product
$errors = [
$this->productSalabilityErrorFactory->create([
'code' => 'is_salable_with_reservations-no_data',
'message' => __('The requested sku is not assigned to given stock')
'message' => __('The requested sku %1 is not assigned to given stock.', $sku)
])
];
return $this->productSalableResultFactory->create(['errors' => $errors]);
Expand Down
1 change: 1 addition & 0 deletions InventorySales/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"You cannot use decimal quantity for this product.","You cannot use decimal quantity for this product."
"Parameter ""sort_order"" must be present for urequired conditions.","Parameter ""sort_order"" must be present for urequired conditions."
"Condition have to implement IsProductSalableForRequestedQtyInterface.","Condition have to implement IsProductSalableForRequestedQtyInterface."
"The requested sku %1 is not assigned to given stock.","The requested sku %1 is not assigned to given stock."
"The requested sku is not assigned to given stock.","The requested sku is not assigned to given stock."
"The requested sku is not assigned to given stock","The requested sku is not assigned to given stock"
"The requested qty is not available","The requested qty is not available"
Expand Down