When you offer recurring and one-off products in your Shopify store, it can be confusing to have two different carts.
It's possible to use the Firmhouse Storefront SDK for all your products and only redirect to Firmhouse checkout when there's a subscription item. All other orders will go through Shopify Checkout.
Setup the cart
To make the Storefront SDK and cart work, please follow the instructions on https://developer.firmhouse.com/storefront/shopify/add-integrated-cart
In addition, assign a shopifyStorefrontAccessToken
variable in the JavaScript snippet. You can obtain this token in Shopify, in the private Firmhouse app you already have created (to be able to sync products and orders between Shopify and Firmhouse.
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.
Copy the token and paste it in the Firmhouse snippet (probably in your theme.liquid or header.liquid)
window.Firmhouse = {
shopifyStorefrontAccessToken: "YOUR TOKEN HERE"
... the other settings ...
}
Important - add ALL products to Firmhouse
When you test adding products to the Firmhouse cart, make sure the product is added in both Shopify & Firmhouse. And the products must be linked in Firmhouse.
See our Shopify product import article on how to import all/selected products into Firmhouse.