Child pages
  • Advanced Subscription Products - Magento 2
Skip to end of metadata
Go to start of metadata


Firefox user notice:

Please use a different web browser to view this document.

Sorry for the inconvenience.

Advanced Subscription Products for Magento 2

Add subscription plans to simple, configurable, downloadable, and virtual products wit the Magento 2 Advanced Subscription Products extension! With the embedded mixed cart functionality, customers can add both one-off and subscription products to the same shopping cart. Admins can notify subscribers about each billing status update by email. Several ordered subscriptions falling under the same delivery date will cost the delivery price of one subscription (as per a single order).

Compatibility: Magento Open Source 2.1.X - 2.3.X, Magento Commerce 2.1.X - 2.3.X

  Product Page

Thank you for choosing Aheadworks!

Installing Advanced Subscription Products

Command Line Installation

1. Backup your web directory and store database

2. Download the Advanced Subscription Products installation package

 3. Upload the contents of the Advanced Subscription Products installation package to your store root directory

 4. In the SSH console of your server, navigate to your store root folder:

cd path_to_the_store_root_folder


php -f bin/magento module:enable Aheadworks_Sarp2


php -f bin/magento setup:upgrade


php -f bin/magento setup:static-content:deploy

5. Flush the store cache, log out from the backend, and log in again


Make sure the installation is done from under the FTP administrator account. Otherwise, make sure to set 775 permissions to the store root directory after the extension is deployed.


Composer Installation

1. Log in to your customer account at and navigate to Account -> Composer access;

2. Configure your store to work with the Aheadworks composer repository:

Add composer repository to composer.json by running:

composer config repositories.aheadworks composer in the Magento installation root.

Use a key pair provided as login and pass. You can optionally save them in the global composer auth file.

 3. You can start using AW composer now.

 For extension names, navigate to Account -> Composer access.

 4. Open the root Magento directory on your server and send Composer the following command:

composer require <component-name>:<version>

Note: Use the previously copied component name and version.

 5. Make sure that Composer finished the installation without errors. Flush store cache, log out and log into the backend again.

Set up cron


If you have already configured cron jobs for your Magento installation, then you can skip this step. Read the following instructions on setting cron job for your Magento store: Magento user guide.

Generally it would be enough to run in the SSH console of your server: 



And insert the following line:  


Don't forget to confirm saving the request when exit.


Introducing Advanced Subscription Products

The Advanced Subscription Products module comes with a set of powerful features out of the box:

  • Combined shopping cart for single and recurring purchases;
  • Same-day subscription orders are charged with the price of one order;
  • Email notifications about upcoming, processed, and failed subscription payments;
  • Simple, virtual, configurable, and downloadable products can be configured as subscriptions.

Extension Logic

With this module, store admins can separately manage subscription plans and all existing subscriptions. After a new plan is created, it can be assigned to one or several products in a store. Each product can have multiple subscription options (plans). The assigning process itself takes place at the product level. Subscriptions are added to each product individually. The provided subscription functionality can be configured in a store along with the subscriptions created within the Magento 2 Subscription & Recurring Payments module.

For this release, we got rid of the separate shopping cart for subscription products. Thus, customers can add any combinations of both single and repeat purchases to the same Magento 2 cart. If a product has multiple subscription plans and/or it is available as both the one-off and the subscription one, all the existing purchase options will be listed in the designated subscription plan selector.

Backend Configuration 

Extension Settings

Start configuring the extension by going to Stores > Configuration > AHEADWORKS EXTENSIONS > Subscription and Recurring Payments 2.

Configuration Page

For separate configuration of each aspect of the module, the parameters on the 'Configuration' page are divided into three sections General, Engine, and Email Settings.

The 'General' parameter set includes two options:

  • Shipping Method For Subscription Orders - the default shipping method for subscriptions: flat rate (fixed) or table rate (best way);
  • Enable Extension Log - enable the option if you need the module to log subscription updates and customer and store admin actions.



If logging is enabled, all information about subscription-related transactions (events) will be added to a text file on a server. This information does not contain any customer personal data. It is listed as entity ID's, including subscription and customer ID's, the number of payment attempts left for the related subscription, subscription status, etc.

The extension logs the following:



In the 'Engine' section, you need to set up only one parameter:

  • Merge same-day subscriptions - by setting the option to 'Yes', you will group subscriptions with same delivery dates into single orders (so that customers can save on shipping).

Lastly, the 'Email Settings' section encompasses the following parameters:

  • Email Sender - the name of the default email sender;
  • Successful Billing Email - enable/disable email alerts about successful subscription billing;
  • Billing Successful Email Template - the email template for successful subscription billing alerts;
  • Failed Billing Email - enable/disable email alerts about failed subscription billing;
  • Failed Billing Email - the email template for failed subscription billing alerts;
  • Send BCC to admin - the email address of the admin BCC's must be sent to;
  • Send Reminder About Next Billing, Days - the number of days before the next billing when the corresponding email reminder must be sent;
  • Next Billing Email Reminder Template - the email template for next billing reminders.


In order to send invoice emails to customers, view the required invoice in Sales > Invoices and click Send Email.

Creating and Editing Subscription Plans

Having configured the main extension settings, you might start creating subscription plans for your products. Go to Sales > SARP 2 by AheadWorks > Plans.

Subscription plans are the core elements of the extension. They can be shared among multiple products with individual subscription options, including initial fees, trial, and regular periods. All the created plans are listed in the dedicated grid.

Plans Grid

The data contained in the 'Plans' grid is divided into in the following columns:

  • ID - an ID of a subscription;
  • Subscription Profile ID - an ID of a subscription profile;
  • Customer - the name of a subscribed customer;
  • Email - the subscriber's email;
  • Group - the susbcriber's group;
  • Subscription Plan - the plan purchased by the subscriber;
  • Status - the current subscription status (active, suspended, or canceled);
  • Created At - the order creation date;
  • Start Date - the susbcription's start date;
  • Last Order - the last order's ID;
  • Last Order Grand Total - the last order's largest total;
  • Last Order Date - the last order's date;
  • Next Order Grand Total - the next order's largest total.

With the 'Actions' box above the grid, you can manage your subscription plans one by one or in bulk.

To create a new plan, click at the top right of the page.

Now, we will explore plan settings.

Edit Plan Page

For your convenience when creating/editing subscription plans, the settings are split into four sections: General, Schedule, Additional Pricing Settings, and Storefront Description.

In the 'General' section, you can enable the plan and specify its name.

Then, schedule your plan by defining the number of payments and payment frequency (the 'Repeat Payments' box). You can create infinite subscription plans by leaving the 'Number Of Payments' field empty.

In the 'Additional Pricing Settings' section, you can do the following:

  • Enable the initial fee for the plan;
  • Enable the trial period for the plan;
  • Indicate the number of trial payments if the trial period is enabled;
  • Set the regular payment price (% of product price);
  • Set the trial payment price (% of product price) if the trial period is enabled;
  • Define the price rounding logic for the plan (up to XX.99, XX.90, or X9.00, down to XX.99, XX.90, or X9.00, or don't round).

For multiple store views, you can indicate individual subscription plan titles. Do this in the 'Storefront Description' section.

Adding Subscription Plans to Products

Now let's see how the created subscription plan(s) can be added to products. Go to Catalog > Products and open any product page.

Per-product Subscription Configuration

In the 'Sarp 2: Subscription Configuration' menu, you can completely configure individual plan settings for each particular product.

First, define in which variants your product will be available (use the 'Subscription' box for this purpose):

  • No - the product will be available only as a one-off purchase;
  • Optional - the product will be available both as a subscription and one-off purchase;
  • Subscription only - the product will be available only as a subscription.

If you run several websites, you can configure plan parameters for each particular one. Use the 'Website' box to select the appropriate website.

Choose the required subscription plan from the 'Plan' box. You can share plans among products since all the created plan options will be available in this selector on each product page.

If the initial fee is enabled, the price will be set automatically in % from a product’s cost (according to the previously defined rounding logic). You can see the fee's amount in the 'Initial Fee' field, respectively. Or, you can set the initial fee manually.

Trial and regular payments can be set manually for each plan or assigned automatically based on the product's price. For automatic price calculation, mark the 'Use plan settings' checkbox. Click at the top right of the page to apply the configured parameters.

Managing Subscriptions

Once the plans have been assigned to the product, the product becomes available for purchase in the store. To monitor all active subscribers, go to Sales > SARP 2 by AheadWorks > Subscriptions.

Subscriptions Grid

 The 'Subscription' grid contains the data about all subscribers divided into the following columns:

  • ID - an ID of a subscription;
  • Subscription Profile ID - an ID of a subscription profile;
  • Customer - the name of a subscriber;
  • Email - the subscriber's email address;
  • Subscription Plan - the plan purchased by the subscriber;
  • Status - the current subscription status (active, suspended, or canceled);
  • Last Order - the last order's ID;
  • Last Order Date - the last order's date.

From the 'Actions' box above the grid, you can change the status of the selected subscription(s).


If a customer deletes their account, their active subscriptions won't be suspended or canceled. Instead, those subscriptions will be marked as the guest ones. They can be merged if the merging conditions (see Extension Settings) are fulfilled. This is the only case when guest orders can merge.

If you edit a subscription order and do not want the old subscription to create orders, please make sure to cancel it manually since out of the box both subscriptions will continue working together.

If needed, you can view the details about each particular subscription profile. To do this, click on the corresponding susbcription profile's ID (each id in the grid is an active link to the related subscription profile page).

Subscription Profile Page

The backend configuration of the module is completed. Now, let's see how the configured subscriptions work on the storefront.

Subscriptions on the Storefront

All product-related subscription plans are listed in the subscription plan selector along with the detailed info about each particular plan.

Subscription Plan Selector

If the 'Subscription' option was previously set to Optional, the product will be also available in the one-off purchase variant.

Thanks to the mixed cart functionality, customers can add any combinations of one-off purchases and subscriptions to their shopping cart.

Mixed Shopping Cart 

 Customers can view all purchased subscriptions in the 'My Subscriptions' tab in their accounts.

My Subscriptions Tab

Each individual subscription can be canceled anytime by clicking on the 'Cancel' active link in the 'Actions' column.

Note that subscriptions with the same delivery date will be combined in a single order. In this case, the delivery price will be calculated as for one subscription delivery.

Uninstalling Advanced Subscription Products

Manual Removal

1. Disable the module by executing the following commands:

php bin/magento module:disable Aheadworks_Sarp2
php bin/magento setup:upgrade

2. Remove the extension files from the following folder:


Automatic Removal (via Composer)

1. Disable the module by executing the following commands:

php bin/magento module:uninstall Aheadworks_Sarp2

Product Page

Need Customization?

Magento 2 Custom Development Services by Aheadworks


You can always find the latest version of the software, full documentation, demos, screenshots, and reviews on
License agreement:
Contact Us:
Copyright © 2019 Aheadworks Co.

  • No labels