This Below line is workig for all cases if cache is enable its working fine,
<span data-bind="html: getCartParam('subtotal')"></span> Add this in minicart.phtml<?php
$quote = $block->getTotalsCache();
$getSubTotal = $quote['subtotal']->getData('value');
$getGrandTotal = $quote['grand_total']->getData('value');
$getShippingRate = $quote['shipping']->getData('value');
$finalSubTotal = $this->helper('Magento\Framework\Pricing\Helper\Data')->currency(number_format($getSubTotal,2),true,false);
$finalShippingTotal = $this->helper('Magento\Framework\Pricing\Helper\Data')->currency(number_format($getShippingRate,2),true,false);
$finalGrandTotal = $this->helper('Magento\Framework\Pricing\Helper\Data')->currency(number_format($getGrandTotal,2),true,false);
?>
Comments
Post a Comment