Adding selling plan options to your Shopify product pages

This guide will help you integrate Selling Plan options into your Shopify store’s product pages and add an additional checkout button for SEPA payment methods for subscriptions.

Before you begin

  • First, follow the setup guide to connect your store to Firmhouse

Let's get started

To update your theme without affecting the live version, duplicate it, make your changes, and publish the updated version when ready.

Add the Selling Plan Selector to Your Product Page Template

Selling plan selector on product page
  1. Create /snippets/selling-plans-integration.liquid. This snippet defines the selling plan selector.

/snippets/selling-plans-integration.liquid
  1. Create /assets/selling-plans-integration.js. This file contains the logic for the selling plan selector.

/assets/selling-plans-integration.js
  1. Add the selling plan selector to sections/main-product.liquid, ideally before the quantity selector. Search for 'quantity_selector' to find the block and insert the snippet at the start

sections/main-product.liquid

Now you should have a working selling plan selector on your product page.

Customizations for using SEPA based payment methods during checkout

To offer SEPA payment methods during checkout, add a SEPA checkout button to your cart.

You can skip this section if SEPA payment methods aren't needed.

  1. Create snippets/sepa-checkout-button.liquid to define the button template for the SEPA checkout button.

snippets/sepa-checkout-button.liquid
  1. Create /assets/sepa-checkout.js. This file contains the logic for the SEPA checkout button.

/assets/sepa-checkout.js
  1. Add sepa checkout buttons on where you want them to appear. By default the checkout buttons will be visible on sections/main-cart-footer.liquid, cart drawer and snippets/cart-drawer.liquid.

sections/main-cart-footer.liquid
snippets/cart-drawer.liquid
snippets/cart-notification.liquid
  1. Update layout/theme.liquid to include the SEPA checkout script and make the selling plan mapping available to the script. A good place to add this is right before the </head> tag.

layout/theme.liquid

Great job! You've successfully added Selling Plan options to your Shopify store. Customers can now subscribe to your products directly from the product page enhancing their shopping experience

Last updated

Was this helpful?