User Manual - Payment and Shipping Restrictions
- Installing Magento 2 Payment & Shipping Restrictions
- Uninstalling Payment & Shipping Restrictions
- Compatibility
- Introducing the Magento 2 Payment & Shipping Restrictions
- Using Magento 2 Payment Restrictions
- Using Magento 2 Shipping Restrictions
- Integrations
Magento 2 Payment & Shipping Restrictions enhances native Magento functionality meant to specify payment and shipping methods at checkout against a variety of criteria. The extension adds the Customer Group criterion. Now vendors are able to specify which payment and shipping methods are to be shown at checkout depending on shoppers' belonging to particular customer groups.
Modules, included in the Payment and Shipping Restrictions 1.0.6: Payment Restrictions 1.1.0 and Shipping Restrictions 1.1.0.
API documentation link
Installing Magento 2 Payment & Shipping Restrictions
Command Line Installation
- Backup your web directory and store database
- Download the Payment & Shipping Restrictions installation package
- Upload contents of the Payment & Shipping Restrictions installation package to your store root directory
- In SSH console of your server navigate to your store root folder:
cd path_to_the_store_root_folder |
run:
php bin/magento module:enable Aheadworks_PaymentRestrictions |
then:
php bin/magento setup:upgrade |
after:
php bin/magento setup:static-content:deploy -f |
5. Flush store cache; log out from the backend and log in again
Make sure the installation is done from the FTP administrator account. Otherwise, set 775 permissions to the store root directory after the extension is deployed. |
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:
1. 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:
2. Login to your ssh console and navigate to your store folder:
cd path_to_the_store_root_folder |
3. Run the following command to install the latest version of the extension:
composer require aheadworks/module-restrictions-for-payments |
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:
4. Enable the extension:
php -f bin/magento module:enable Aheadworks_PaymentRestrictions |
Next, register the extension:
bin/magento setup:upgrade |
Recompile your 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.
To upgrade the extension:
5. To update or upgrade an extension:
Download the updated extension file. Take note of the module-name and version. Export the contents to your Magento root.
If a composer package exists for the extension, run one of the following.
Update per module name:
composer update aheadworks/module-payment-restrictions |
Updater per version:
composer require aheadworks/module-payment-restrictions:<version> |
Run the following commands to upgrade, deploy, and clean the cache.
php bin/magento setup:upgrade --keep-generated |
Uninstalling Payment & Shipping Restrictions
Manual Removal
1. Disable the module by executing the following commands:
php bin/magento module:disable Aheadworks_PaymentRestrictions |
2. Remove the extension files from the following folder:
app/code/Aheadworks/PaymentRestrictions |
Automatic Removal (via Composer)
1. Disable the module by executing the following commands:
php bin/magento module:uninstall Aheadworks_PaymentRestrictions |
Compatibility
Module Version |
Magento Version |
As of version 1.0.6 |
2.4.4 - 2.4.6 |
As of version 1.0.8 |
2.4.5 - 2.4.7 |
The PHP version depends on your current Magento version. Please, refer to your Magento version release notes.
Introducing the Magento 2 Payment & Shipping Restrictions
Payment & Shipping Restrictions for Magento 2 comes as two modules in one pack: Shipping Restrictions and Payment Restrictions. These are the tools to specify payment and shipping methods available on the checkout page with regard to customers' belonging to particular customer groups, as pre-configured on your store.
What is special in Aheadworks Payment & Shipping Restrictions for Magento 2 in comparison to the native Magento functionality:
- Payment and shipping methods restricted at checkout
- Customer groups to restrict payment and shipping methods
- Separate restrictions for shipping and payment
- Multiselect of customer groups and All Groups selector
- Support of Multishipping
- Integration with Company Accounts, One Step Checkout, Adobe Payment Services
Using Magento 2 Payment Restrictions
The extension comes as a set of similar configuration facilities available at Stores → Configuration → Aheadworks Extensions → Payment Restrictions.
Payment Methods
The page will feature the list of all the payment methods, enabled on the store.
To enable/disable payment methods, proceed to Stores → Configuration → Sales → Payment Methods. Should you have any questions regarding the use of thereof refer to the official Magento 2 manual or the instructions of a correspondent payment method/gateway available on the web. For example, if you are using the Bambora APAC extension from Aheadworks, your guide can be accessed here.
Only the methods enabled on the store will feature for restricting on the config page of the present module.
Restrictions
To set restrictions, click on a payment method and assign groups of customers to be eligible for this type of payment.
Clicking on the name of the payment method will unfold the full name of thereof, as well as the checklist of all customer groups available on the store. To add/delete customer groups, proceed to Customers → Customer Groups. The official Magento 2 manual will instruct you on how to do that. Name your custom groups meaningfully, so that you later have meaningful restrictions on payments.
By default, all customer groups are given the same rights to all payment methods. It means that all payment methods are open for all groups. When in the default mode, the list of groups will come inactive, greyed-out, and the Use System value checkbox checked.
To specify the groups which will have access to the chosen payment method, untick the Use System Value checkbox and click on the customer group on the list. The multi-select feature is available in the extension: select the group, press the CTRL button on the keyboard, hold it and select as many other groups as you need. Multiselect works with your mouse and mobile devices too.
The All Groups option will apply restrictions to all groups presented on the list. |
Sample restrictions: B2C customers will be thankful for their ever favorite credit/debit cards or payment gateways. B2B clients, in turn, will appreciate bank transfers or letters of credit. |
Only those methods of payment which were pre-configured for display with the present extension will feature on the Checkout page. This will save the time of customers and furthermore suggest to them you know their needs and preferences.
Using Magento 2 Shipping Restrictions
Configuration Options
The extension comes as a set of single-type configuration facilities available at Stores → Configuration → Sales → Shipping Restrictions. The page will feature the list of all shipping methods saved on the store.
Learn more on configuring shipping methods in the official Magento 2 user guide.
To set restrictions, unfold the options of the shipping method by clicking on the name of the method, and scroll down to the Allowed for Selected Customer Groups Only parameter.
The Allowed for Selected Customer Groups Only parameter comes as a checklist of all customer groups available in the store. To add/delete customer groups, proceed to Customers → Customer Groups. The official Magento 2 manual will instruct you on how to do that. Name your custom groups meaningfully, so that you later have meaningful restrictions on shipping.
By default, all customer groups are given the same rights to all shipping methods. It means that all shipping methods are open to all groups. When in the default mode, the list of groups will come inactive, greyed-out, All Groups selected.
To specify the groups which will have access to the chosen shipping method, click on the name of the group. It will then get highlighted in blue. To select multiple groups, press the CTRL button on the keyboard and select as many groups as you need. Multiselect works on mobile devices too.
The All Groups option will apply restrictions to all groups presented on the list. |
Sample restrictions: B2C customers will be thankful for discounted or free shipping, B2B clients will appreciate alternatives to manage bulky orders and complex delivery needs. |
Only those methods of shipping that have been pre-configured herein will feature on the Checkout page. Cutting the list short and suggesting selected options for various customer groups will save the time of customers and will suggest to them you know their needs and preferences.
Integrations
1. The Magento 2 Company Accounts module allows creating company accounts and assigning them to particular customer groups. Those will be your B2B clients, and thereby they may well need specific shipping and payment methods, different from those of general customers.
Integration with Company Accounts allows to set shipping restrictions for the certain company. To set shipping restrictions for the certain company, go to the Company edit page: Allowed Shipping Methods tab.
The Magento 2 One Step Checkout extension enhances the native Magento checkout functionality for the best user experience. It will feature the specified customer shipping and payment methods in its usual, enhanced, way.
2. Now Payment & Shipping Restrictions 1.0.6 is integrated with Adobe Payment Services. To install Adobe Payment Services, you need to:
1. Get the module from Magento Marketplace;
2. Install the module via composer using command:
composer require magento/payment-services
By installing Adobe Payment Services on the store, you gain the ability to individually manage the visibility of all enabled payment options in Adobe Payment Services for specific customer groups. Learn more about Adobe Payment Services.
Already used our product?
We would appreciate your feedback. Please, leave a review.