I would like to display cart items in the order summary sidebar during the shipping stage with no show/hide toggle functionality. Then on reaching payment methods stage display the cart items in the default collapsible and expandable drop down section.

Is there away of doing this?

I am referring to the code found in cart-items.html

<div class="block items-in-cart" data-bind="mageInit: {'collapsible':{'openedState': 'active', 'active': isItemsBlockExpanded()}}">
    <div class="title" data-role="title">
        <strong role="heading">
            <translate args="maxCartItemsToDisplay" if="maxCartItemsToDisplay < getCartLineItemsCount()" />
            <translate args="'of'" if="maxCartItemsToDisplay < getCartLineItemsCount()" />
            <span data-bind="text: getCartLineItemsCount()"></span>
            <translate args="'Item in Cart'" if="getCartLineItemsCount() === 1" />
            <translate args="''" if="getCartLineItemsCount() > 1" />
    <div class="content minicart-items" data-role="content">
        <div class="minicart-items-wrapper overflowed">
            <ol class="minicart-items" data-bind="afterRender: mitchTest">
                <each args="items()">
                    <li class="product-item">
                        <div class="product">
                            <each args="$parent.elems()" render="" />
    <div class="actions-toolbar" if="maxCartItemsToDisplay < getCartLineItemsCount()">
        <div class="secondary">
            <a class="action viewcart" data-bind="attr: {href: cartUrl}">
                <span data-bind="i18n: 'View and Edit Cart'"></span>

I am not sure how knockout handles the different stages and how I might pass that information to the order summary sidebar to display/hide this functionality.

Any ideas/information much appreciated. Thank you.

  • 2
    If your trying to change anything to Magento checkout, triple your estimation. – vitoriodachef Jul 18 '18 at 17:40

Your Answer

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

Browse other questions tagged or ask your own question.