Skip to content

Magento 2.4.7 How to show count 0 on mini cart when no product is in cart?

So i recently upgraded Magento to 2.4.7-p3 and the counter number no longer shows in the minicart when empty. My code in the minicart.phtml file is as below.

<span class="counter-number">
         <!-- ko ifnot: getCartParam('summary_count') -->
            <!-- ko i18n: '0 ' --><!-- /ko -->
        <!-- /ko -->
        <!-- ko if: getCartParam('summary_count') -->
            <!-- ko text: getCartParam('summary_count') --><!-- /ko -->
        <!-- /ko -->                
        </span>

the frontend is showing the below

<span class="counter-number">
            <!-- ko if: getCartParam('summary_count') --><!-- /ko -->
        </span>

so it looks like knockout is not loading it since the ugrade.