0

Currently, in my minicart.phtml override file I have knockout.js code like this to display the number of items in my cart:

        <!-- ko if: getCartParam('summary_count') -->
            <!-- ko text: getCartParam('summary_count') --><!-- /ko -->
            <!-- ko i18n: 'items' --><!-- /ko -->
        <!-- /ko -->

If an item is added to my cart I also want to display the current cart subtotal. Is there a method for directly displaying this with knockout.js or is there another simpler way to achieve this? How do I find out what other things I can display with knockout.js?

2

You can display subtotal using this code.

<!-- ko text: getCartParam('subtotalAmount') --><!-- /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.