Configuration Options
Below is a list of configuration options available for the Firmhouse object. You can set these options in two ways: by defining them in window.Firmhouse = {}
, or by passing them as an argument to the window.initializeFirmhouse
.
For example:
storefrontToken string
required
string
required
Firmhouse storefront token. See Create a Storefront API token for information about how to create one.
showAlerts boolean
boolean
default: true
You can set this to false
to disable the alerts that appear when a product is added to the cart.
translations object
object
See Translations and custom copy for detailed information about this.
language string
string
See Translations and custom copy for detailed information about this.
returnUrl string
string
You can customize the return URL after a successful checkout. By default, the user will be redirected to the default Firmhouse successful checkout page.
editCartUrl string
string
If you enabled shopping cart for your project, you can use this setting to customize the link for edit order button on checkout. e.g. https://my-store.myshopify.com?openCart=true
By default, it will be set to the current page URL with openCart=true
query parameter to display the cart directly when the user is redirected.
To enable the shopping cart go to Checkout > Preferences on Firmhouse portal and scroll down to Checkout Flow. Check the "Enable shopping cart" box and update your project.
b2b boolean
boolean
default: false
You can set this to true
to enable B2B mode. It will enable company information fields on the checkout form.
shopifyShopDomain string
string
The domain of your Shopify store. e.g. my-store.myshopify.com
.
If you want to use Shopify Checkout when there is no recurring products in the cart, you must set this option along with shopifyCheckoutUrl.
shopifyStorefrontAccessToken string
string
You can find this token in the Shopify admin, under Apps, on the bottom it says "manage private apps".
Select the Firmhouse app and in the bottom of that list, enable Storefront access.
Make sure that "Read and modify checkouts" is enabled.
Last updated