How to remove replace null value in place of Zero(0) in minicart if There is no items in cart in magento2?

  • Have you applied my answer solutions? Aug 24, 2017 at 5:34

1 Answer 1


Add below code to :


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

Just after this code

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.