Php4u Payment Restrictions Module for Magento 2 Requirements : Magento 2.0.x or 2.1.x
Version 1.0.0 for Magento 2 1 Installation...3 1.1 Manual Install... 3 1.2 Composer install...4 2. Configuration...5 2.1 Viewing restrictions in place...6 2.2 Adding new rule...6 2.2.1 Rule information...6 2.2.2 Conditions... 9 2.3 Editing rule...9 2.4 Deleting rule... 9 3. FAQ...10 I need help... 10
Thank You for your business, we are extremely happy that you decided to use our module. To help you with the process we created this documentation which is divided into sections. 1 Installation At this point you have 2 choices you can install it manually via command line or if you have your own git repository you can add it there and include it. First method is quick and easy, but if you re thinking about reusing it on many projects please go composer route as it will be much easier to maintain consistency between all projects. 1.1 Manual Install Step 1: Backup your code directory and magento database you can do it via command line using n98magerun2 or you can do it directly from magento admin this will ensure that if things go wrong you can always revert back to previous version. Step 2: Download the extension from My Account section Step 3: Upload it to your Magento installation root directory ideally please check it on your dev/stage server first to make sure it works as expected. Step 4: Login to your server via SSH and in the terminal enter the following at the command line prompt: cd /path/to/your/magento2/root/folder mkdir p app/code/php4u/ unzip module paymentrestrictions.zip module paymentrestrictions/* d app/code/php4u/ mv app/code/php4u/module paymentrestrictions app/code/php4u/paymentrestrictions php bin/magento module:enable Php4u_PaymentRestrictions php bin/magento setup:upgrade If your Magento 2 is in production mode you need also php bin/magento bin/magento setup:static content:deploy php bin/magento bin/magento setup:di:compile Step 5: After login into Admin and opening Stores >> Configuration >> Advanced >> Advanced, the module will be shown in the admin panel Also you should notice new menu section Payment Restrictions under Marketing
1.2 Composer install Create new git repository and call it for example php4u-blastsearchlucene, note the git ssh url to that newly created repository as you will need it later. Then create any folder and extract downloaded package there. Once you are inside newly created directory run following in the command line: git init git remote add origin git@github.com:yourcompany/php4u modulepayment restrictions.git git checkout b master git add * git commit m "Initial commit of version 1.0.0" git tag 1.0.0 git push origin master tags At this point code should be pushed to your repository and ready to be included in your project. You can confirm it by going in your browser to the repository and checking source there. Step 1: Add repository url into your project composer config repositories.php4 pm git git@github.com:yourcompany/php4u module paymentrestrictions.git Step 2: Add it as dependency to your project composer require php4u/module paymentrestrictions Step 3: refresh caches and other areas php bin/magento setup:upgrade If your Magento 2 is in production mode you need also php bin/magento bin/magento setup:static content:deploy php bin/magento bin/magento setup:di:compile
2. Configuration There is no configuration required for that module. All required settings are in Marketing Payment Restrictions section. There are 5 main areas which will be described later.
2.1 Viewing restrictions in place This section is very similar to any other grid section of Magento 2 admin. You can look for any restrictions by name, date or status (active or not) Also on this screen there is a button on top right to add new rule. 2.2 Adding new rule When you click on New rule button on listing screen you should see screen as below. 2.2.1 Rule information
There are two tabs on the left Rule Information and Conditions. Rule information tab is the default one you see and you should start there. Rule name This is a name of the payment restriction by which you can identify quickly what is that restriction about. It is not visible to the customer. As example you can enter Restrict card payments in UK. Description this field is admin only as well, you can enter more detailed information about that rule Payment methods to disable once all rule conditions are met select which methods should be disabled by module f.e. if you want to disable Check Order method select it from the list. By holding CTRL key and clicking you can select multiple options there. Status Active or Inactive makes rule on or off Priority order in which rule is processed
From / To (Dates) You can set start or end date, or both start and end date when rule should be active on. Date is inclusive. Apply to Stores if you want rule to be active only in certain magento stores please select them. By holding CTRL key and clicking you can select multiple options there. Apply to Customer groups - rule can be applied to certain customer groups only. By holding CTRL key and clicking you can select multiple options there. Apply to specific days of the week this setting is useful if you want rule to be active only on certain days f.e. week days or weekend. By holding CTRL key and clicking you can select multiple options there.
Apply from / to given time last option allows you to set time when rule is active. If from option is empty 00:00 is assumed. If to option is empty 23:59 is assumed. This can work nicely with previous option (weekday). 2.2.2 Conditions This section is very similar to Catalog or Cart rules where multiple conditions can be combined to create very powerful and flexible way of setting the rule 2.3 Editing rule Go to Marketing Payment restrictions Then find the rule you want to edit and click on it 2.4 Deleting rule Go to Marketing Payment restrictions Then find the rule you want to edit and click on it, then from top click on DELETE button
3. FAQ You can find answers for most common questions here. If you want to ask us any question please send us email on support@php4u.zendesk.com I need help Please contact us via https://php4u.zendesk.com Again thank You for your trust and we are happy to be part of your success.