Skip to content
Snippets Groups Projects
Commit df96b512 authored by Vinay Shah's avatar Vinay Shah
Browse files

magento/magento2#12705: Integrity constraint violation error after reordering...

magento/magento2#12705: Integrity constraint violation error after reordering product with custom options

- Fixed issue by updating options if parent item is same for more than one product
- Fixed issue for reorder in admin while checking the availability of product, which is not available in case of associate product.
- Fixed Null coalescing operator issue
parent f89e04d8
Branches
No related merge requests found
...@@ -45,7 +45,7 @@ class OrderedProductAvailabilityChecker implements OrderedProductAvailabilityChe ...@@ -45,7 +45,7 @@ class OrderedProductAvailabilityChecker implements OrderedProductAvailabilityChe
public function isAvailable(Item $item) public function isAvailable(Item $item)
{ {
$buyRequest = $item->getBuyRequest(); $buyRequest = $item->getBuyRequest();
$superAttribute = isset($buyRequest->getData()['super_attribute']) ? $buyRequest->getData()['super_attribute'] : []; $superAttribute = $buyRequest->getData()['super_attribute'] ?? [];
$connection = $this->getConnection(); $connection = $this->getConnection();
$select = $connection->select(); $select = $connection->select();
$orderItemParentId = $item->getParentItem()->getProductId(); $orderItemParentId = $item->getParentItem()->getProductId();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment