Event on checkout

Because I of the different domains (shopcoobie.com and foxy cart.com),
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: https://wiki.foxycart.com/snippets/misc_cart_and_checkout/product_upselling
  • 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.