Config

spiffy.config(configObj)

Modify the global Spiffy.js config before spiffy.load()

  • configObj - object of config properties

    • hideSummary:false - Hide/show the order summary on checkouts

    • hideCoupon:false - Hide/show coupon field on checkouts

    • hideSidebar: true - Hide/show sidebar content on checkouts

    • hideHeader:true - Hide/show page header on checkouts

    • hideFooter:true - Hide/show page footer on checkouts

    • hidePortalCustomer: false - Hide/show logged in customer details in portal

    • hidePortalHeader: false - Hide/show logo and title header in portal

    • hidePortalSubscriptions: false - Hide/show subscription management in portal

    • hidePortalPaymentPlans: false - Hide/show payment plan management in portal

    • hidePortalToggle: false - Hide/show the button to toggle between customer/affiliate portal

    • hidePortalOrders: false - Hide/show list of orders in portal

    • hidePortalPasswordChange: false - Hide/show password change option in portal

    • hidePortalLogout: false - Hide/show logout button in portal

    • pageTakeover:true - Enable/disable full-page for checkouts upsells/thank you pages

    • upsellPageTakeover:true - Enable/disable full-page for checkouts upsell pages

    • thanksPageTakeover:true - Enable/disable full-page for checkouts thank you page

    • popupEnabled:false - Enable/disable opening Spiffy checkout links in popup modal

    • popupPrefetch:true - Enable/disable prefetching popup when link is moused over

    • compatibilityMode:true - Enable/disable the use of <div>'s for components

    • trackingEnabled:true - Enable/disable the tracking/analytics features

    • autoIdentify: true - Uses form submissions to improve customer recognition and affiliate tracking

    • preserveUrlParams: false - Append the current url's parameters to any links on the page. Useful for passing affiliate tracking or UTM data to subsequent pages

    • linkExclusions: [] - Array of strings of element selectors that should be ignored for link modification (preserve params, etc.). This is useful for issues with SpiffyJS messing with other scripts on your site.

Example Config

This should be added before spiffy.load() in your SpiffyJS code.

spiffy.config({
    // Enables div version of components
    compatibilityMode: true,

    // Tracking Options
    trackingEnabled: true,
    preserveUrlParams: false,
    linkExclusions: [],

    // Checkout Options
    hideSummary: false,
    hideCoupon: false,
    hideSidebar: true,
    hideHeader: true,
    hideFooter: true,
    
    // Portal Options
    hidePortalCustomer: false,
    hidePortalHeader: false,
    hidePortalSubscriptions: false,
    hidePortalPaymentPlans: false,
    hidePortalOrders: false,
    hidePortalLogout: false,

    // Takeover Options
    pageTakeover: true, // Used to easily turn both takeover settings on
    upsellPageTakeover: true,
    thanksPageTakeover: true,

    // Popup Options
    popupEnabled: true,
    popupPrefetch: true,
})

Last updated