You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently on version 2.4.3 in my development but the object_id is missing on a 2.4.6. The idea is that populating this id would make the processing of the inventory reservations and cleaning up missing reservations much quicker. I also have a request the inventory reservation and testing quantity available is done in one transaction. I've attached the full log sql of creating test orders.
The above example was produced by moving the sale event to after the Proceed. $order = $proceed($order);
Here is my update to AppendReservationsAfterOrderPlacementPlugin:
\var\www\html\vendor\magento\module-inventory-sales\Plugin\Sales\OrderManagement\AppendReservationsAfterOrderPlacementPlugin.php
`public function aroundPlace(
OrderManagementInterface $subject,
callable $proceed,
OrderInterface $order
): OrderInterface {
$itemsById = $itemsBySku = $itemsToSell = [];
foreach ($order->getItems() as $item) {
if (!isset($itemsById[$item->getProductId()])) {
$itemsById[$item->getProductId()] = 0;
}
$itemsById[$item->getProductId()] += $item->getQtyOrdered();
}
$productSkus = $this->getSkusByProductIds->execute(array_keys($itemsById));
$productTypes = $this->getProductTypesBySkus->execute($productSkus);
Hi @pmathbliss. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
There is an error in /var/www/html/vendor/magento/module-inventory-reservation-cli/Command/Input/GetReservationFromCompensationArgument.php at line: 105 Call to a member function getEntityId() on bool#0 /var/www/html/vendor/magento/module-inventory-reservation-cli/Command/CreateCompensations.php(135): Magento\InventoryReservationCli\Command\Input\GetReservationFromCompensationArgument->execute('585000609606:11...')
In de inventory_reservation table, I have missing object_id of some reservations:
This error causes some products in frotend to appear when they shouldn't at price 0:
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
The object_id is populated in inventory_reservation.meta_key
{"event_type":"order_placed","object_type":"order","object_id":"14","object_increment_id":"000000022"}
I am currently on version 2.4.3 in my development but the object_id is missing on a 2.4.6. The idea is that populating this id would make the processing of the inventory reservations and cleaning up missing reservations much quicker. I also have a request the inventory reservation and testing quantity available is done in one transaction. I've attached the full log sql of creating test orders.
The above example was produced by moving the sale event to after the Proceed. $order = $proceed($order);
Here is my update to AppendReservationsAfterOrderPlacementPlugin:
\var\www\html\vendor\magento\module-inventory-sales\Plugin\Sales\OrderManagement\AppendReservationsAfterOrderPlacementPlugin.php
`public function aroundPlace(
OrderManagementInterface $subject,
callable $proceed,
OrderInterface $order
): OrderInterface {
$itemsById = $itemsBySku = $itemsToSell = [];
foreach ($order->getItems() as $item) {
if (!isset($itemsById[$item->getProductId()])) {
$itemsById[$item->getProductId()] = 0;
}
$itemsById[$item->getProductId()] += $item->getQtyOrdered();
}
$productSkus = $this->getSkusByProductIds->execute(array_keys($itemsById));
$productTypes = $this->getProductTypesBySkus->execute($productSkus);
}`
Actual result (*)
Magento 2 order placed.txt
The text was updated successfully, but these errors were encountered: