SpiffyJS
  • SpiffyJS
    • Overview
    • Config
    • Elements
    • Methods
    • Events
    • Checkouts
      • Settings
      • Methods
      • Events
    • Affiliates
  • JavaScript API (beta)
    • Overview
    • Examples
  • Examples
    • Full Page Loader
    • Dynamically Apply Discounts
  • REST API
  • Back to Spiffy
Powered by GitBook
On this page
  • .update(configObj)
  • .open()
  • .close()
  • .fullscreen.on()
  • .fullscreen.off()
  • Add/Remove Event Listeners

Was this helpful?

  1. SpiffyJS
  2. Checkouts

Methods

PreviousSettingsNextEvents

Last updated 4 years ago

Was this helpful?

.update(configObj)

Modify this checkout's this is the same as changing the settings during spiffy.checkout(url, configObj)

  • configObj - Object of

.open()

Open checkout in popup modal

.close()

Close checkout popup modal

.fullscreen.on()

Sets the checkout to fill the browser window. This is used internally when going to an upsell or thank you page while pageTakeover is enabled.

.fullscreen.off()

Returns the checkout to it's normal view

Add/Remove Event Listeners

The .on() and .off() methods can be used directly on a checkout object to scope the event listeners to that specific checkout ()

// find or create checkout instance
var checkout = spiffy.checkout("https://yourcompany.spiffy.co/checkout/test-checkout")

// add event listener
checkout.on('form:ready', function () {
    // do things...
})

settings
config properties
see event listener docs