Configuration options

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 Shopify Experts.

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>

Last updated