Enable Selling Plans

Enable Selling Plan Data from Shopify Directly

Rebuy now supports subscription selling plans from all subscription apps that manage Shopify selling plans! Rebuy will now be pulling in the product selling plan information directly from Shopify. This allows Rebuy to use the selling plan data from all subscription services available through Shopify. Using this method, you can now use subscription features in Rebuy widgets and the Smart Cart.

To begin, please log in to the Rebuy admin panel, navigate to the "Integrations" tab, and select the "Subscriptions Integration" option.

Once you've reached the subscriptions page, simply switch the integration status to "On" and confirm your desire to enable the subscription feature. After enabling the integration, a confirmation pop-up will appear, and you will also observe a "connected" status displayed on the page.

One final step remains, which is to link your particular subscription provider. To accomplish this, click on "Connect Subscriptions," select your primary subscription provider from the dropdown menu, and then click "Connect." A confirmation pop-up will appear, verifying the successful completion of the integration.

You have the option to select a secondary subscription provider, but please note that this choice is entirely optional and not necessary for the functionality of your primary provider.


Once this process is completed, Rebuy will have access to your subscription plans, enabling the use of the "switch-to-subscription" feature. Consequently, Rebuy will be able to recommend subscriptions for relevant products and activate the "switch-to-subscription" functionality in the following product areas

  • Switch to Subscription in Smart Cart
  • Switch to Subscription on checkout pages (Checkout Page Widget only)
  • Switch to Subscription Pop-ups
  • Subscription select on Rebuy carousels

To learn more, please click here.

Enable Selling Plans in a SandBox Environment

The below code snippet will allow you to enable the return of selling plan data whenever a widget or the Smart Cart has subscription features enabled. This allows you to test these features in a sandbox environment such as a development theme. It is suggested to wrap this snippet in a script tag and place at the bottom of the body of your theme.liquid file.

document.addEventListener('rebuy.loaded', function(event){
  
  // Tell Rebuy to pull in selling plan data when available
  window.Rebuy.shop.shopify_selling_plans_enabled = true;
});

Below are two areas where you can find this selling plan data. In order get this data on the Rebuy Cart object you will need to have the Smart Cart enabled and Switch to Subscription enabled within the Smart Cart.

Alternatively you can run the enrichCart function from the Cart class in the console. Rebuy.Cart.enrichCart();

// Product level selling plan groups
Rebuy.Cart.cart.items[0].product.selling_plan_groups;

// Variant seleve selling plan allocations
Rebuy.Cart.cart.items[0].product.selected_variant.selling_plan_allocations;

📘

Transition from Recharge integration

If you are currently using the Recharge integration and have any custom code written around subscriptions then it is suggested to utilize the ability to test in a sandbox environment. This way you can ensure that any custom code will work with the format of data that we are getting back from Shopify directly. There are differences in the data format along with the introduction of selling plan allocations on the variant level. Currently we are not getting any variant level allocations back from the Recharge integration.