In my magento 2 theme in cart page in console, I have errors:

Uncaught SyntaxError: Unable to parse bindings.
Bindings value: if: getCartParam(summary_count') 
Message: missing ) after argument list

how I can fix this?


' is missing from the code:

should be like this:


example code from minicart.phtml:

 <a class="action showcart" href="javascript:void(0);<?php //echo $block->getShoppingCartUrl(); ?>"
       data-bind="scope: 'minicart_content'">
        <span class="text"><?php echo __('My Cart'); ?></span>
        <span class="counter qty empty"
              data-bind="css: { empty: !!getCartParam('summary_count') == false }, blockLoader: isLoading">
            <span class="counter-number">
            <!-- ko if: getCartParam('summary_count') --><!-- ko text: getCartParam('summary_count') --><!-- /ko --><!-- /ko -->
            <!-- ko ifnot: getCartParam('summary_count') -->0<!-- /ko -->
            <span class="counter-label">
                <!-- ko i18n: 'items' --><!-- /ko -->

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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