Package name: peterbrain/magento2-terms-conditions
- 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: Admin configuration:
composer require peterbrain/magento2-terms-conditions
- 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.
bin/magento module:enable PeterBrain_TermsConditions
bin/magento setup:upgrade
bin/magento setup:static-content:deploy
bin/magento cache:flush
- Enable module ouptut in
Stores > Configuration > PeterBrain Extensions > Terms & Conditions > General Configuration
- In Magento 2 admin, navigate to
Stores > Configuration > Sales > Checkout
and setEnable Terms and Conditions
toYes
. 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.
- Every condition meeting the scope of your current store view will be displayed at
- 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:
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