The issue is fixed in 2.2.0 and 2.1.9 .
github.com/magento/magento2/issues/5946#issuecomment-336415013
How to fix it manually (in an earlier Magento version)
Step 1.
Replace the block:
With the following one:
Step 2.
Replace in app/code/Magento/Checkout/view/frontend/web/template/minicart/content.html
all occurences of cart().<property>
to getCartParam('<property>')
.
Example 1.
From:
cart().summary_count
to:
getCartParam('summary_count')
Example 2.
From:
to:
Step 3.
Replace the block:
<span class="counter qty empty"
data-bind="css: { empty: cart().summary_count == 0 }, blockLoader: isLoading">
<span class="counter-number"><!-- ko text: cart().summary_count --><!-- /ko --></span>
<span class="counter-label">
<!-- ko if: cart().summary_count -->
<!-- ko text: cart().summary_count --><!-- /ko -->
<!-- ko i18n: 'items' --><!-- /ko -->
<!-- /ko -->
</span>
</span>
With the following one:
<span class="counter qty empty"
data-bind="css: { empty: !!getCartParam('summary_count') == false }, blockLoader: isLoading">
<span class="counter-number"><!-- ko text: getCartParam('summary_count') --><!-- /ko --></span>
<span class="counter-label">
<!-- ko if: getCartParam('summary_count') -->
<!-- ko text: getCartParam('summary_count') --><!-- /ko -->
<!-- ko i18n: 'items' --><!-- /ko -->
<!-- /ko -->
</span>
</span>
1 Like