cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3 - Order Item Extension Attribute

Magento 2.3 - Order Item Extension Attribute

Hi All,
I have extension attributes for sales order and items in custom tables. storing the values after placing an order and also using a plugin OrderRepository's afterGet() method. 
In database tables all values are saving properly.

 

But when I view the order in admin, the order item extension values are not showing up.

 

Plugin code:

$orderItems = $order->getItems();

foreach ($orderItems as $orderItem) { ... $orderItemExtension = $extensionAttributes ? $extensionAttributes : $this->orderItemExtensionFactory->create(); $srpSalesOrderItem = $this->srpSalesOrderItemRepository->get($orderItem->getItemId()); $orderItemExtension->setSrpSalesOrderItem($srpSalesOrderItem); $orderItem->setExtensionAttributes($orderItemExtension); .... return $order

Please let me know what is the issue here.