Skip to content

Shows all terms and conditions of the respective store view on a page

License

Notifications You must be signed in to change notification settings

PeterBrain/magento2-terms-conditions

Repository files navigation

Magento 2 Module - TermsConditions

Package name: peterbrain/magento2-terms-conditions

Main Functionalities

  • Display all terms and conditions (Magento built-in feature) of the respective store view on a page.
  • Add this page to Sitemap.
  • Display specific terms and conditions within a page or block with a widget.

Widget code:

{{widget type="PeterBrain\TermsConditions\Block\Widget\Tc" agreement_id="<id>"}}

or use the Magento integrated GUI for widgets.

Widget to display specific terms and conditions: Use Widget to display specific terms and conditions. Admin configuration: Admin configuration

Installation

Method 1: Composer (recommended)

composer require peterbrain/magento2-terms-conditions

Method 2: Zip file (not recommended)

  • Unzip the zip file in app/code/PeterBrain

This extension requires PeterBrain Core. Ensure that you have it installed prior to installing this module. Use Composer to install it automatically with this module.

Enable & deploy

bin/magento module:enable PeterBrain_TermsConditions
bin/magento setup:upgrade
bin/magento setup:static-content:deploy
bin/magento cache:flush

Usage

  • Enable module ouptut in Stores > Configuration > PeterBrain Extensions > Terms & Conditions > General Configuration
  • In Magento 2 admin, navigate to Stores > Configuration > Sales > Checkout and set Enable Terms and Conditions to Yes. Module status provides you with a short summary.
  • If not done already, add a new condition at Stores > Terms and Conditions
    • Every condition meeting the scope of your current store view will be displayed at https://www.example.com/termsconditions/ and your custom url.
  • The url to the terms and conditions is automatically added to the sitemap the next time it is generated. If a user-defined url is specified, only this url will be added to the sitemap.

Required system configuration: Required system configuration

Credits

Credits go to Abdul from magento.stackenchange.com for the inspiration. See: https://magento.stackexchange.com/questions/220500/show-terms-and-conditions-on-static-page