Skip to main content
Share Your Experience: Take the 2024 Developer Survey
4 votes
Accepted

How to update sales_order_item in Magento 2.3 using order_id(entity_id)?

Try this, In your controller add the following code <?php namespace Vendor\Module\Controller\Orders; class ...
Prathap Gunasekaran's user avatar
2 votes

Magento 2 how add extension attribute to order item

1. If you want to use extension attribute then you must declare extension attribute at app/code/YOurModule/{Modulename}/etc/extension_attributes.xml. Create extension_attributes.xml <?xml version=&...
Amit Bera's user avatar
  • 77.5k
1 vote
Accepted

what is the use of qty_invoiced column in sales_order_item table?

Magento has a feature to invoice a qty as per defined by admin. e.g customer placed an order with 10 qty but for some reason customer want 5 qty only or instore only 5 available now admin want to ...
Gohil Rajesh's user avatar
  • 2,947
1 vote
Accepted

How do I get sale_order_item table data by using injection method?

I like to use a CollectionFactory to create the collection, then use the pre-baked methods for querying. Try injecting these : \Magento\Sales\Model\ResourceModel\Order\Item\CollectionFactory $...
nick.graziano's user avatar
1 vote

Can't copy data from quote_item to sales_order_item

foreach($order->getItems() as $item) { $quoteItem = $quote->getItemById($item->getQuoteItemId()); if ($quoteItem) { if($quoteItem->hasData('deposit')){ $item->setData('deposit', $...
Jafar Pinjar's user avatar
  • 1,929
1 vote

Magento 2 Get Value of Custom Attribute on Magento 2 Rest API V1/orders/items

You have to make your Custom Attribute attribute as extension attribute for Magento\Sales\Api\Data\OrderItemInterface create extension_attributes.xml at your modules app/code/{Vendorname}/{...
Amit Bera's user avatar
  • 77.5k
1 vote

Magento 2.2.10 is it possible to get all the orders status is pending?

You can use this <?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $pendingOrdersCollection = $objectManager->get("\Magento\Sales\Model\Order")->getCollection()-&...
Kishan Savaliya's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible