Skip to content

MSI-1015: Cannot Place Order with Configurable Product on Custom Stock. #1016

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

Closed
wants to merge 1 commit into from

Conversation

RomaKis
Copy link
Contributor

@RomaKis RomaKis commented Apr 24, 2018

@@ -67,11 +68,13 @@ public function execute(array $items, int $stockId) : void
{
$productTypes = $this->getProductTypesBySkus->execute(array_keys($items));
foreach ($items as $sku => $qty) {
if (false === $this->isSourceItemsAllowedForProductType->execute($productTypes[$sku])) {
if (false === $this->isSourceItemsAllowedForProductType->execute($productTypes[$sku])
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InventorySales module must not have the dependency on ConfigurableProduct module

@naydav naydav self-assigned this May 14, 2018
$isSalable = (bool)$stockItemData[GetStockItemDataInterface::IS_SALABLE];
$isSalableForRequestedQty = $isSalable && $qtyLeftInStock >= 0;
} else {
$isSalableForRequestedQty = (bool)$stockItemData[GetStockItemDataInterface::IS_SALABLE];
Copy link

@naydav naydav May 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to replace on Exception
Because it is unexpected and ambiguous behaviour to check quantity for complex products

@naydav
Copy link

naydav commented May 21, 2018

Closed due to proper fix in
#1204

@naydav naydav closed this May 21, 2018
@maghamed maghamed deleted the 1015 branch March 20, 2019 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants