0

I got sales order details from Rest API.

enter image description here

How to fetch this values(like When i call base_currency_code it will show USD). Thank you.

0

As an APi response is converted into array, You can fetch 'base_currency_code' by writing a loop as below.

$itemData = arrya();

foreach($apiItems as $item)
{
  $itemId = $item['item_id'];
  $itemData[itemId]['base_currency_code'] = $item['base_currency_code'];
}

print_r($itemData);
  • Thanks for replaying @amitkumar. I got result myself. – Rajesh Nagappan Oct 11 '17 at 7:02
  • kindly upvote me, if my answer is helpfull. – Amitkumar solanki Oct 11 '17 at 7:12
1

This is my result,

foreach ($result['items'] as $item){
print_r($item['base_currency_code']);
echo '<br>';
}

Finally i will get all order details. Thanks you.

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.