Intercepting Checkout Button Wix Stores

I am using WIX stores app and I want to intercept the button push of the checkout button so I can run some code before proceeding to checkout. ie after button push, check if certain items are in the cart and if so open light box, other wise continue to checkout.

I don’t believe there is an event for the checkout button available. Can anyone point me in the right direction of how I might be able to achieve this? Maybe a custom cart page?

You can’t trigger any code in checkout page. So you won’t be able to open a lightbox at checkout page. Unless if you have a custom checkout page.


You can check if correct items in cart or not using getValidationViolations SPI and return an error if correct items are not in cart yet.

You can’t trigger a lightbox directly from SPI but you may open it in cart page using different techniques. (But you can’t open that lightbox in native checkout page)

1 Like

Figured it out. You can add code to the masterPage.js back end file that checks if the url is the checkout page and open a lightbox etc. :slight_smile:

2 Likes