Details
-
Improvement
-
Resolution: Done
-
High
-
4.5.6, 4.6.2
-
Ibexa Commerce
-
Yes
Description
We are already providing a Checkout's context to an Order (https://github.com/ibexa/checkout/blob/main/src/lib/Order/Factory/OrderFactory.php#L80):
$context = $checkout->getContext(); //////// return new OrderCreateStruct( $orderUser, $orderCurrency, $orderValue, 'local_shop', $orderItems, $orderCompany, $context );
Providing CartEntry's context to an OrderItem as well would be useful (https://github.com/ibexa/checkout/blob/main/src/lib/Order/Factory/OrderFactory.php#L220):
$orderItems[] = new OrderItem(
$entry->getQuantity(),
$orderItemValue,
$orderItemProduct,
$entry->getContext()->toArray(),
);