更新された小計を取得するには、minicart.phtmlファイルの行を下に保つ必要があります。
この下の行は、キャッシュが有効になっている場合にすべてのケースで機能します。
<span data-bind="html: getCartParam('subtotal')"></span> 
総計の値、送料、
現在の見積もりのGrandTotal、小計、配送料は、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);
?>