Installation, Uninstallation, License Keys, Upgrading, and Downgrading Guide
- Installing M2 Advanced Subscription Products
- Set up cron
- Integrate License Keys
- Important! Manage Keys During Deployments
- Upgrade to Version 3
- Downgrade to Version 2
- Uninstalling M2 Advanced Subscription Products
Installing M2 Advanced Subscription Products
NOTE: Please ensure that the Advanced Subscription Products module is installed before proceeding with the installation of add-ons. |
Refrain from installing packages for those payment methods you are not using. |
Composer Installation
- If you are installing an extension from Aheadworks for the first time, you need to add our composer repository to your Magento store:
Login to your ssh console and navigate to your store folder:
cd path_to_the_store_root_folder
|
Run the following command:
composer config repositories.aheadworks composer https://dist.aheadworks.com/ |
On successful execution of the command you will be able to use the composer to install the extensions.
To install the extension:
- Login to your ssh console and navigate to your store folder:
cd path_to_the_store_root_folder
|
- Run the following command to install the latest version of the extension:
composer require aheadworks/module-sarp3
|
if you need to install a specific version, run this command:
composer require aheadworks/module-sarp3:<version>
|
Specify the version of the extension in <version> |
When prompted, enter Public Key (Username) and Private Key (Password):
Both Public Key (Username) and Private Key (Password) can be found in My Projects and Licenses in your personal account on our site:
If you need to install a specific version, run this command (specify the version of the extension in <version>):
composer require aheadworks/module-sarp3:<version> |
Need to integrate M2 Advanced Subscription Products with a payment method or GraphQL?
Note: It is recommended to install only the payment method modules and compatibility modules that you’re going to use in your store.
General modules
Module Name | Official Module (Required!) | Description |
aheadworks/module-sarp3 |
core module, mandatory |
|
aheadworks/module-sarp2-graph-ql |
magento/module-graph-ql |
GraphQL support |
aheadworks/module-sarp2-reports |
Allows integration with Aheadworks Advanced Reports. |
|
aheadworks/module-sarp2-quick-view |
Allows clients to view subscription options in a pop up on category pages |
|
aheadworks/module-sarp2-customer-group |
Deprecated, allows moving customers to a certain group upon subscription purchase. |
Payment method modules
Note: Ensure the official module of the payment gateway you are using is installed.
Module Name |
Official Module (Required!) |
Description |
aheadworks/module-sarp2-aps |
magento/module-payment-services-paypal |
Adobe Payment Services support |
aheadworks/module-sarp2-stripe |
stripe/module-payments |
Stripe support |
aheadworks/module-sarp2-adyen |
adyen/module-payment |
Adyen support |
aheadworks/module-sarp2-paypal |
magento/module-paypal |
PayPal support |
aheadworks/module-sarp2-authorizenet |
authorizenet/magento-module-authorizenet |
Authorize.net support |
aheadworks/module-sarp2-authnetcim |
paradoxlabs/authnetcim |
Authorize.net support. Requires an additional module from Adobe Marketplace. |
aheadworks/module-sarp2-free-payment |
Free payment, enables admin to create a subscription with free trial for a client in the backend without specifying any payment details. Then the client should login and add their payment details until the trial period hasn't expired. |
|
aheadworks/module-sarp2-braintree |
gene/module-braintree |
Braintree support for Magento 2.3.X |
aheadworks/module-sarp2-braintree-by-paypal |
Suggests: paypal/module-braintree-core |
Braintree support for Magento 2.4.X |
aheadworks/module-sarp2-psigate |
meetanshi/magento-2-psigate-direct-payment |
PSIgate payment method support. Requires an additional module from Adobe Marketplace. |
- Enable the extension:
bin/magento module:enable Aheadworks_Sarp2 |
How to enable a specific payment method or GraphQL?
Note: Enable only the payment method modules for which you have installed the official payment gateway module and a compatibility add-on.
Proceed with a corresponding command (associated with the specific module you intend to use):
Module |
Command |
GraphQL |
bin/magento module:enable Aheadworks_Sarp2GraphQl |
Adyen |
bin/magento module:enable Aheadworks_Sarp2Adyen |
Stripe |
bin/magento module:enable Aheadworks_Sarp2Stripe |
Adobe Payment Services |
bin/magento module:enable Aheadworks_Sarp2Aps |
PayPal |
bin/magento module:enable Aheadworks_Sarp2Paypal |
AuthorizeNet |
bin/magento module:enable Aheadworks_Sarp2AuthorizeNet |
Authorize.net by ParadoxLabs |
bin/magento module:enable Aheadworks_Sarp2AuthNetCim |
Free Payment |
bin/magento module:enable Aheadworks_Sarp2FreePayment |
Braintree (for Magento 2.3.*) |
bin/magento module:enable Aheadworks_Sarp2Braintree |
Braintree (for Magento 2.4.*) |
bin/magento module:enable Aheadworks_Sarp2BraintreeByPaypal |
PSIgate |
bin/magento module:enable Aheadworks_Sarp2Psigate |
Next, register the extension:
bin/magento setup:upgrade |
Recompile the Magento store if you are in the Production mode:
bin/magento setup:di:compile |
To verify that the extension is enabled, run this command:
bin/magento module:status |
Clean store cache, by running the following command:
bin/magento cache:clean |
Log out and Log in the backend again.
Want to use the Hyvä theme module? To install the Hyvä theme module, you need to install the module via composer using command:
|
To upgrade the extension:
- Update per module name:
composer update aheadworks/module-sarp3 |
- If needed, you can specify an exact version:
composer require aheadworks/module-sarp3:<version> |
Run the following commands to upgrade store, deploy it, and clean the cache.
bin/magento setup:upgrade --keep-generated |
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.
In most cases, it is enough to run the following command in the SSH console of your server:
crontab -e |
And insert the following lines:
*/3 * * * * php -c <ini-file-path> <your Magento install dir>/bin/magento cron:run |
Remember to confirm the Save request on exit.
Integrate License Keys
When the license for Advanced Subscription Products for Magento 2 is purchased and integrated into your project, four License Keys will be generated. One key is designated for production, while three are for testing environments. Each key allows you to connect one store with Advanced Subscription Products.
You can find these keys from My Account > My Projects and Licenses in the relevant project.
After installing Advanced Subscription Products, navigate to Stores > Configuration > Aheadworks Extensions > Advanced Subscription Products in your Magento Admin. In the Integration Details section, you'll find:
- License Key - insert the key from My Projects and Licenses.
Note: Utilize Test Keys for staging and the production key for the live environment. Test keys have limitations - only 10 subscriptions can be created and managed. |
- Magento Access Token - grants access to your Magento stores.
- Bypass HTTP Authorization - set Yes for test keys. This bypasses HTTP Authorization commonly used in development mode/staging.
If set to Yes, two additional fields appear:
- HTTP Authorization Username - enter the HTTP Authorization username associated with the website.
- HTTP Authorization Password - enter the corresponding password.
Make sure to configure the settings correctly to avoid any issues. If HTTP Authorization is enabled on the store and Bypass HTTP Authorization isn't configured, the extension won't function correctly.
Please click the "Connect" button to connect your website with Advanced Subscription Products.
Remember to Disconnect your website each time during deployments.
Manage Keys During Deployments
If the key is already active on another store, inserting it on a new domain will trigger an error. When deploying from a stage server using test keys to production without clicking the disconnect button, an error will occur during setup:upgrade, resulting in a loss of connection and deletion of the public key stored in the database. A note will appear on all Magento pages, indicating the need to configure Subscription and Recurring Payments module.
What to do:
Change the key to another test or production key based on the data migration during deployment.
If you click Disconnect before deployment, then after deployment, click the Connect button to activate everything on the new server.
In short:
- When data has been duplicated after deployment, it's essential to insert a new key.
- During data migration, click Disconnect, and after deployment, click Connect.
Upgrade to M2 Advanced Subscription Products Version 3
Before initiating the upgrade process, ensure that your current Advanced Subscription Products Version 2 is at least 2.24.0 to avoid potential issues.
Please note that the upgrade is possible only through Composer. |
To install the extension:
- Login to your ssh console and navigate to your store folder:
cd path_to_the_store_root_folder
|
- Run the following command to install the latest version of the extension:
composer require aheadworks/module-sarp3
|
if you need to install a specific version, run this command:
composer require aheadworks/module-sarp3:<version>
|
Next, register the extension:
bin/magento setup:upgrade
|
Recompile the Magento store if you are in the Production mode:
bin/magento setup:di:compile
|
Clean store cache, by running the following command:
bin/magento cache:clean
|
Downgrade to Advanced Subscription Products Version 2
Note: Before downgrading, make sure to disconnect your License Keys to avoid any loss of data.
- Login to your ssh console and navigate to your store folder:
cd path_to_the_store_root_folder
|
- Run the following command:
composer remove --no-update aheadworks/module-sarp3 |
Next, upgrade setup:
bin/magento setup:upgrade
|
Recompile the Magento store if you are in the Production mode:
bin/magento setup:di:compile
|
Clean store cache, by running the following command:
bin/magento cache:clean
|
Uninstalling M2 Advanced Subscription Products
Please be very careful when uninstalling/disabling this module. This module uses a declarative DB scheme. Once the module is uninstalled the DB tables will be lost.
NOTE: Advanced Subscription Products for Magento 2 is a SaaS service, which means ALL subscriptions will stop processing once the module is uninstalled. |
- Disable the extension and the integration patches by executing the following commands:
bin/magento module:uninstall Aheadworks_Sarp2 |
Want to learn more about Advanced Subscription Products? Read the following articles:
Already used our product?
We would appreciate your feedback. Please, leave a review.