Skip to main content

Posts

Showing posts from July, 2021

Magento 2 Minicart - Display line item subtotal rather than unit price

url: https://magento.stackexchange.com/questions/173028/magento-2-minicart-display-line-item-subtotal-rather-than-unit-price     Final Solution, You can get item qty using $qty = $item->getQty(); Now just you have to set $block->getUnitDisplayPriceInclTax()*$qty to get lineItem subtotal for each item. app/design/frontend/{Packagename}/{themename}/Magento_Weee/templates/checkout/cart/item/price/sidebar.phtml   <?php /** @var $block \Magento\Weee\Block\Item\Price\Renderer */ $item = $block ->getItem(); $originalZone = $block ->getZone(); $block ->setZone(\Magento\Framework\Pricing\Render::ZONE_CART); /* custom logic*/ $qty = $item ->getQty(); ?> <?php if ( $block ->displayPriceInclTax() || $block ->displayBothPrices()): ?> < span class = "price-including-tax" data-label = " <?php echo $block ->escapeHtml(__( 'Incl. Tax' )); ?> " > <?php if ( $block ->displayPriceWithWeeeDetai...