Fluorescent
Flash Cart
Flash Cart
  • Flash Cart Help Center
    • Get Started
    • FAQ
    • Support
  • Cart components
    • Quick cart
      • Cart density
      • Cart summary area
      • Cart title
      • Empty cart promotion
      • Sidebar style
    • Added-to-cart popup
    • Floating cart icon
    • Quick purchase bar
      • Customize quick purchase bar
      • Promotion banner
  • Cart Blocks
    • Using cart blocks
    • Cart items
      • Item images
      • Item savings
      • Live traffic label
      • Low inventory warning
      • Unit prices
    • Cross-sells
      • Global cross-sells
      • Handpicked cross-sells
      • Automatic recommendations
      • Cross-sells: Tips and tactics
      • Analytics
    • Free shipping bar
    • Payment icons
    • Text bar
    • Text list with icons
    • App embeds
    • Custom Liquid
  • Style settings
    • Colors
    • Fonts
    • Custom CSS
  • For Developers
    • API custom events
    • Configuration options
Powered by GitBook
On this page
  • Set up configuration object
  • Available configuration options
  • addToCartSelector
  • disabledUrls
  • maxUpsells
  • integrations
  1. For Developers

Configuration options

PreviousAPI custom events

Last updated 1 year ago

We do not support code customizations. This guide offers a basic reference for developers. Always test code changes on a duplicated, unpublished version of your theme. For assistance, we recommend finding a professional developer through .

Flash Cart has some built-in configuration options so developers can easily add their own functionality to the app. This guide shows how to enable configuration options with examples below.

Set up configuration object

To get started, you will need to add a configuration object that will contain your options.

STEPS

In your Theme Library:

  1. Click Actions > Edit code.

    We recommend editing an unpublished copy of your theme.

  2. In the Layout folder, click to open the theme.liquid file.

  3. At the end of the file, paste the following code:

    <script>
     window.ObsidianConfig = {
    
     };
    </script> 
  4. Click Save.

    You can add your configuration options inside this object.

Available configuration options

Use the available configuration options below to start making your customizations.

addToCartSelector

By default, our app looks for the Add to cart button inside the product form. If your add to cart button is outside the form—maybe a sticky cart on mobile or an additional button at the bottom of the page—you can use the following code to trigger our app properly:

<script>
window.ObsidianConfig = {
  addToCartSelector: '.your-selector'
};
</script>

disabledUrls

If you want to disable the app on specific pages, you can pass in the URLs as an array. This prevents the add to cart button from opening the cart drawer, but leaves the app enabled if a user clicks the cart link in the header.

This URL format will work for multi-language sites as well.

<script>
window.ObsidianConfig = {
    disabledUrls: ['/collections/build-your-own-bundle', '/products/handle']
};
</script>

maxUpsells

Use the following code to limit the number of upsells manually. Default is a max of 4.

<script>
window.ObsidianConfig = {
  maxUpsells: 1
};
</script>

integrations

By default, we automatically detect other apps and integrate with them when we can. You can disable auto-integration by setting autolink to false.

<script>
window.ObsidianConfig = {
  integrations: [
    {id: 'product-customizer', autolink: false},
  ],
};
</script>
Shopify Experts