2

Is it possible to disable Snipcart's full-page cart? I have set data-config-modal-style="side" like the docs says to but on smaller screens the cart still opens the full page-cart.

I don't want to have to design two different carts to look the same.

NeNaD
  • 18,172
  • 8
  • 47
  • 89
Vincent Orback
  • 2,327
  • 22
  • 35

1 Answers1

2

It looks like they automatically switch to full-page view in small screens. What you can do is override that behavior with the same styles they are using for side-modal. Add this to your global css:

.snipcart-modal__container {
  width: 35% !important;
  max-width: 540px !important;
  margin-left: auto !important;
  right: 0 !important;
}

.snipcart-modal__container.snipcart-layout--large {
  width: 100% !important;
  max-width: 100% !important;
}

You can also remove data-config-modal-style="side" from HTML now, since you don't need it anymore.

NeNaD
  • 18,172
  • 8
  • 47
  • 89
  • This is for sure a way but I prefer the content/html in the side-cart which differs from the full page cart. – Vincent Orback Sep 17 '21 at 20:30
  • You can not achieve this through HTML unless they support it (you should send them direct message). The styles that I putted as answer are Snipcart's style for side-cart. – NeNaD Sep 17 '21 at 20:54
  • Yes I'm hoping they see this question :) This css will also effect the next page, the checkout, which would be good to keep full width. – Vincent Orback Sep 17 '21 at 21:44
  • You are right. I didn't consider it. I updated my answer. Can you try it now? – NeNaD Sep 18 '21 at 21:56