Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.




Section


Column
width50%

Table of Contents

Warning

Firefox user notice:

Please use another web browser to view this document.

Sorry for the inconvenience.



Column
width30%

Magento 2 Payment Restrictions enhances native Magento functionality meant to specify payment methods at checkout against a variety of criteria. The extension adds the Customer Group criterion. Now vendors are able to specify which payment methods are to be shown at checkout depending on shopper's belonging to a particular customer group. 

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

Product Page


...

Command Line InstallationComposer Installation


Panel
borderWidth2px
borderStylesolid

1. Backup your web directory and store database


Panel
borderWidth2px
borderStylesolid

2. Download the Payment Restrictions installation package


Panel
borderWidth2px
borderStylesolid

 3. Upload contents of the Payment Restrictions installation package to your store root directory


Panel
borderWidth2px
borderStylesolid

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

No Format
cd path_to_the_store_root_folder

run:

No Format
php -f bin/magento module:enable Aheadworks_PaymentRestrictions

then:

No Format
php -f bin/magento setup:upgrade

after:

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


Panel
borderWidth2px
borderStylesolid

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


Note

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.




Column
width50%


Panel
borderWidth2px
borderStylesolid

If you are installing an extension from Aheadworks for the first time, you need to add our composer repository to your Magento store:

Panel
borderWidth2px
borderStylesolid

1. Login to your ssh console and navigate to your store folder:

Panel
borderWidth2px
borderStylesolid
cd path_to_the_store_root_folder

Run the following command:

Panel
borderWidth2px
borderStylesolid

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.



Panel
borderWidth2px
borderStylesolid

To install the extension:

2. Login to your ssh console and navigate to your store folder:

Panel
borderWidth2px
borderStylesolid
cd path_to_the_store_root_folder



Panel
borderWidth2px
borderStylesolid

 3. Run the following command to install the latest version of the extension:

Panel
borderWidth2px
borderStylesolid
composer require aheadworks/module-payment-restrictions

if you need to install a specific version, run this command:

Panel
borderWidth2px
borderStylesolid
composer require aheadworks/module-payment-restrictions:<version>


Tip

Specify the version of the extension in <version>


Panel
borderWidth2px
borderStylesolid

When prompted, enter Public Key (Username) and Private Key (Password):
screenshot-1.png


Note

Both Public Key (Username) and Private Key (Password) can be found in the Composer Access page in your personal account on our site:
image-20190522-140823.png
Note that the password will not be displayed for security reasons.



Panel
borderWidth2px
borderStylesolid

4. Enable the extension:

Panel
borderWidth2px
borderStylesolid
php -f bin/magento module:enable Aheadworks_PaymentRestrictions

Next, register the extension:

Panel
borderWidth2px
borderStylesolid
bin/magento setup:upgrade

Recompile your Magento store if you are in the Production mode:

Panel
borderWidth2px
borderStylesolid
bin/magento setup:di:compile

To verify that the extension is enabled, run this command:

Panel
borderWidth2px
borderStylesolid
bin/magento module:status

Clean store cache, by running the following command:

Panel
borderWidth2px
borderStylesolid
bin/magento cache:clean

Log out and Log in the backend again.


Panel
borderWidth2px
borderStylesolid

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.


Code Block
titleUpdate per module name:
composer update aheadworks/module-payment-restrictions


Code Block
titleUpdater per version:
composer require aheadworks/module-payment-restrictions:<version>

Run the following commands to upgrade, deploy, and clean the cache.

Panel
borderWidth2px
borderStylesolid
php bin/magento setup:upgrade --keep-generated
php bin/magento setup:static-content:deploy
php bin/magento cache:clean






Introducing the Magento 2 Payment Restrictions

Section

Payment Restrictions for Magento 2 is a tool to specify payment methods available on the checkout page with regard to the customers' belonging to particular customer groups, as pre-configured on your store.

What is special in Aheadworks Payment Restrictions for Magento 2 in comparison to the native Magento functionality:

  • Payment methods restricted at checkout
  • Customer groups to restrict payment methods
  • All Groups and Multiselect features for customer groups selection
  • Integration with One Step Checkout, Company Accounts



Using Magento 2 Payment Restrictions

Section

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 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 methods enabled on the store will feature for restricting on the config page of the present extension.

Restrictions

To set restrictions, click the payment method and assign the groups of customers which to your experience will 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 check-list 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 you have meaningful restrictions on payments.

By default all customer groups are given 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 multiselect 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.

Info

The All Groups option will apply restrictions to all groups presented on the list.


Info

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 time of customers, and furthermore suggest them you know their needs and preferences.

Integrations

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 payment methods, different to those of general customers. 

The Magento 2 One Step Checkout extension enhances the native Magento checkout functionality for best user experience. It will feature the specified for the customer payment methods in its usual, enhanced, way.



Uninstalling Payment Restrictions


Section


Column
width50%

Manual Removal


Panel

1. Disable the module by executing the following commands:

No Format
php bin/magento module:disable Aheadworks_PaymentRestrictions
php bin/magento setup:upgrade



Panel

2. Remove the extension files from the following folder:

No Format
app/code/Aheadworks/PaymentRestrictions




Column
width50%

Automatic Removal (via Composer)

Panel

1. Disable the module by executing the following commands:

No Format
php bin/magento module:uninstall Aheadworks_PaymentRestrictions





Product Page

Need Customization?

You can always find the latest version of the software, full documentation, demos, screenshots, and reviews on http://ecommerce.aheadworks.com
License agreement: https://ecommerce.aheadworks.com/end-user-license-agreement/
Contact Us: httphttps://ecommerce.aheadworks.com/contacts/contact
Copyright © 2021 Aheadworks Co. http://www.aheadworks.com