I need to display the original price & special price in checkout summary. I used below code but it displays only once.

  $items = $result['totalsData']['items'];
        foreach ($items as $index => $item) {
          $quoteItem = $this->checkoutSession->getQuote()->getItemById($item['item_id']);
          $result['totalsData'][$index]['original_row_total'] = $quoteItem->getProduct()->getPrice();
          $result['totalsData'][$index]['total_qty_ordered_per_item'] = $quoteItem->getQty();
       return $result;

Your Answer

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

Browse other questions tagged or ask your own question.