Events
These global-only events can only be used on the global spiffy
object using event methods. In addition to these, any sub-object events can be used globally as well.
Global Events
ready
General event that fires once Spiffy.js has successfully loaded and is ready. As a rule of thumb, any code that uses any methods or objects that belong to Spiffy.js should wait until ready
to fire
spiffy.on('ready', function () {
// safely do things here...
})
Checkout Events
All checkout events can also be used globally
iframe:ready
When an iframe url has been generated with all the necessary element and config data
data
- Objectuid
- uid of the iframe container
form:ready
When the checkout or portal components have mounted in the iframe
data
- Objectuid
- uid of the iframe containermodality
- the modality of the iframe, eitherinline
orpopup
items:changed
When the items of a checkout/order change
data
- Objectuid
- uid of the iframe container
coupons:changed
When a user adds or removes a coupon
data
- Objectuid
- uid of the iframe containercode
- coupon code used
payplan:changed
When the selected payment plan on a checkout changes
data
- Objectuid
- uid of the iframe containerpayplan
- Object
upsell:show
When changing from a checkout to an upsell or from one upsell to another
data
- Objectuid
- uid of the iframe containerslug
- checkout slug
order:error
When an attempt to process an order fails
data
- Objectuid
- uid of the iframe container
order:success
When changing from a checkout or upsell to a thank you page
data
- Objectuid
- uid of the iframe containerslug
- checkout slugforward
- the forwarding url set for the thank you page otherwiseundefined
Last updated
Was this helpful?