1

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?

0

1 Answer 1

0

' is missing from the code:

should be like this:

getCartParam('summary_count')

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>
            <span class="counter-label">
                <!-- ko i18n: 'items' --><!-- /ko -->
            </span>
        </span>
    </a>

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.