Magento 2 Terms and Conditions by Customer Group

Table of Content

  1. Extension Installation Guide
  2. Configuration
  3. Adding Terms and Conditions
  4. Terms and Conditions Checkbox on Checkout Page in Frontend

  1. Extension Installation
  • For Magento Marketplace Customers
    • Find the Composer name and version of the extension in the extension’s composer.json file.
    • Login to your SSH and run:
      • composer require meetanshi/magento-2-terms-and-conditions-by-customer-group --ignore-platform-reqs
    • Enter your authentication keys. Your public key is your username; your private key is your password.
    • Wait for Composer to finish updating your project dependencies and make sure there aren’t any errors.
    • To verify that the extension installed properly, run the command:
      • php bin/magento module:status Meetanshi_CustomTermsConditions --ignore-platform-reqs
          • By default, the extension is probably disabled.
          • Enable the extension and clear static view files:
      • php bin/magento module:enable Meetanshi_CustomTermsConditions --clear-static-content
      • php bin/magento setup:upgrade
      • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
      • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
      • php bin/magento cache:flush
         
  • For Meetanshi Customers
  • Extract the zip folder and upload our extension to the root of your Magento 2 directory via FTP.
  • Login to your SSH and run below commands step by step:
  • php bin/magento setup:upgrade
  • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
  • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
  • php bin/magento cache:flush
  1. Configuration

To configure the extension, login to Magento 2, move to Stores à Configuration à Terms and Conditions by Customer Group where you can find the setting to enable the extension.

 

  • Terms and Conditions by Customer Group: Enable Terms and Conditions by Customer Group extension.

  1. Adding Terms and Conditions
    By default, Magento 2 allows adding terms and conditions for the website from Stores à Settings à Terms and Conditions. The grid lists all the terms and conditions already added. Click on “Add New Condition” button to add a new condition.

  • On click of “Add New Condition” button, the admin can add terms and conditions related details like condition name, status, select content type, how terms and conditions is applied, store views, checkbox text, add content, set content height. Apart from this default functionality, the extension facilitates with selecting the customer groups for which the admin wants to apply the condition.

Note: Don’t forget to select YES to “Enable Terms and Conditions” from Stores > Configuration > Sales > Checkout to show terms and conditions checkbox to customers on the checkout page.

 

  1. Terms and Conditions Checkbox on Checkout Page in Frontend
    Once the extension is configured and terms and conditions have been added successfully, customers can see terms and conditions checkbox based on their customer group, on the checkout page in frontend. Customers have to agree to the terms and conditions by checking the box, to place the order successfully.

 

  • Before agreeing to terms and conditions, customers can click on the text to open and read the terms and conditions content in a responsive popup.