I need get the inventory source id based on the order item. I tried with order details but it not display. Anyone please help me.

  • You need to know source id/name from order_item/product_id ? – anonymous Mar 29 at 6:32
  • Yes, I know the order_id and product_id – venkata prasad Apr 1 at 8:12
  • Did you get solution because its more than 2 week old !!? – anonymous Apr 1 at 8:19
  • 1
    get the solution but i need any other alternative solution – venkata prasad Apr 1 at 11:12

You can do like :

$sourceItems = $this->getSourceItemsBySku->execute('Your SKU');

foreach($sourceItems as $sourceItem){
    echo $sourceItem->getSourceCode();

Hope it's better then what you've used so far. ;)

  • it shows the all the sources of item having quantity. I need product quantity reduced source. – venkata prasad Apr 1 at 12:54
  • What do you mean by reduced source ? Please provide more details. – anonymous Apr 1 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.