The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Event on checkout

Because I of the different domains ( and foxy,
how can I create an event on clicking the checkout button in the cart?

I am trying to trigger an event when a user clicks it - possibly to offer a deal before they leave.

  • fc_jedfc_jed FoxyCart Team

    You could try out something like this in your custom script:
    FC.onLoad = function () {
    FC.client.on('checkout-submit', function () {
    // Your custom code goes here.
  • fc_adamfc_adam FoxyCart Team

    Jed's approach will work for the checkout button on the checkout - but it's also logic that will only work on our latest 2.0 stores.

    I see your store is currently on version 0.7.2, so you'll need a slightly different approach.

    In looking at your page, I see you're offering the offer when the user clicks on an add to cart. If you wanted to offer it within the cart, or even the checkout, you could take a look at this snippet:
  • Thanks for the directions guys, but neither solution will work here.
    I came up with an alternate direction that should work just as well.
  • fc_jedfc_jed FoxyCart Team

    Glad to hear that. Let us know if you would run into additional concerns.
Sign In or Register to comment.