i need to disable sticky behaviour from the cart summary block in checkout cart page, but can't figure out how to do it.

I tried overriding js file




and commenting out sticky call:

 /* $('.cart-summary').mage('sticky', {
    container: '#maincontent'
  }); */

as is suggested in Customize sticky behaviour of Cart Summary: Magento 2, without success.

I'm using Magento 2.2.6

Thanks in advance,



Fastest and rude solution:

On your custom theme CSS file add this:

.cart-summary {
   position: unset !important;

I found this solution as I'm not using theme.js to custom my theme and worked fine for me on Magento 2.3...

Maybe not the best practice but works fine for most situations.


Also remove this js code from your pub folder. It may be


I just finished dealing with the same problem. In my case, I wanted to render the cart summary widget in another page and being sticky just ruins everything.

I simply ran the following line of code when my javascript component loads and it removes the sticky behavior.

$('.cart-summary').mage('sticky', {});

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.