65 if (is_array(
$result[
'items'])) {
66 foreach (
$result[
'items'] as $key => $itemAsArray) {
67 if (
$item = $this->findItemById($itemAsArray[
'item_id'],
$items)) {
68 $this->itemPriceRenderer->setItem(
$item);
69 $this->itemPriceRenderer->setTemplate(
'checkout/cart/item/price/sidebar.phtml');
70 $result[
'items'][$key][
'product_price']=$this->itemPriceRenderer->toHtml();
86 if (isset(
$totals[
'subtotal'])) {
87 $subtotal =
$totals[
'subtotal']->getValueInclTax() ?:
$totals[
'subtotal']->getValue();
101 if (isset(
$totals[
'subtotal'])) {
102 $subtotal =
$totals[
'subtotal']->getValueExclTax() ?:
$totals[
'subtotal']->getValue();
115 if (empty($this->totals)) {
116 $this->totals = $this->
getQuote()->getTotals();
128 if (
null === $this->quote) {
129 $this->quote = $this->checkoutSession->getQuote();
141 protected function findItemById(
$id, $itemsHaystack)
143 if (is_array($itemsHaystack)) {
144 foreach ($itemsHaystack as
$item) {
146 if ((
int)
$item->getItemId() ==
$id) {
afterGetSectionData(\Magento\Checkout\CustomerData\Cart $subject, $result)
__construct(\Magento\Checkout\Model\Session $checkoutSession, \Magento\Checkout\Helper\Data $checkoutHelper, \Magento\Tax\Block\Item\Price\Renderer $itemPriceRenderer)