Infinite Options & ReCharge

Subscriptions by Recharge lets you sell recurring product subscriptions on your Shopify store. The basic Infinite Options functionality works with Recharge out of the box. Your option selections will be carried to the order's details whether the checkout goes through Recharge or Shopify.

However, if you are using the product bundles feature from Infinite Options, you will need to do some additional setup to ensure that the bundled product is also added to the order as a recurring product, and not just a one-time purchase.

Follow the instructions below to apply the additional setup.

Add every bundled product to the same Recharge subscription RuleSet as the parent product

1. From your ReCharge app, click on Rulesets, and select Rulesets from the dropdown menu.

2. Click on the pencil icon on the far right that corresponds to the ruleset that the parent product belongs to.

3. Click the Add products button and select all of the possible products that will be added as bundled products.

4. Click Save at the bottom of the page.

Add code snippet into your theme code

1. From your Shopify admin, click Online Store to arrive at the Themes page.

2. Find the theme you want to edit, click the Actions▼ button, then click Edit code.

3. Click on the theme.liquid file in the Layout folder.

4. If you have already added the Infinite Options faster loading script to your theme, please search for the following script code, and remove it from this file.

<script src="//d1liekpayvooaz.cloudfront.net/apps/customizery/customizery.js?shop={{shop.permanent_domain}}"></script>

5. Paste the following code snippet after the <head> tag.

<!-- Support Recharge Recurring Bundled products in Infinite Options -->
<script>
  // Create "window.Shoppad.apps.infiniteoptions" object if it doesn't already exist
  "Shoppad.apps.infiniteoptions".split(".").reduce(function(o, x) { if (!o[x]) {o[x] ={};} return o[x] }, window);
  // Define beforeReady callback
  window.Shoppad.apps.infiniteoptions.beforeReady = function(subscribe) {
    var priceModId;
    function rechargeAlter() {
      if (window.Shoppad.apps.infiniteoptions.priceMod.orderId != priceModId) {
        priceModId = window.Shoppad.apps.infiniteoptions.priceMod.orderId;
        window.Shoppad.apps.infiniteoptions.priceMod.variantSubmissionAlters.push(function(variantValues) {
          if ($('*[name="purchase_type"]:checked').val() === 'autodeliver') {
              jQuery.each(variantValues, function(_, variant) {
                variantValues[_].properties = {
                  "shipping_interval_frequency": jQuery('*[name="properties[shipping_interval_frequency]"]').val(),
                  "shipping_interval_unit_type": jQuery('*[name="properties[shipping_interval_unit_type]"]').val()
                };
              });
            }
            return variantValues;
        });
      }
    }
    // Make sure the app has not be re-init'd
    subscribe('appLoad', function(event) {
      rechargeAlter();
    });
    // Make sure the app has not be re-init'd
    subscribe('validationSuccess', function(event) {
      rechargeAlter();
    });
    // Make sure the app has not be re-init'd
    subscribe('productBundleAdd', function(event) {
      rechargeAlter();
    });
  };
</script>
<script src="//d1liekpayvooaz.cloudfront.net/apps/customizery/customizery.js?shop={{shop.permanent_domain}}"></script>
<!-- End Support Recharge Recurring Bundled products in Infinite Options -->

Now when you add a product to the cart with the ReCharge Subscribe & Save option, any attached bundled products will also be added to the cart as a ReCharge subscription product. 🎉

If you need any help with this, feel free to contact us!

Note: If you are offering a discount in your ReCharge subscription, the bundled product that is added to the subscription will always be the full-price product.

Still need help? Contact Us Contact Us