-
Notifications
You must be signed in to change notification settings - Fork 0
LiteCommerce module: custom Terms & Conditions template
In the stand-alone "out-of-the-box" version of LiteCommerce you cannot format your Terms & Conditions page with HTML tags. This small tutorial explains how you can do it by creating a custom template file for the page:
-
Create the "skins/default/en/modules/<your developer ID>/<your module ID>/terms_and_conditions/body.tpl" file and put there your page contents formatted with HTML tags. Then create the "classes/XLite/Module/<your developer ID>/<your module ID>/View/Terms.php" file and edit it as follows:
<?php namespace XLite\Module\<your developer ID>\<your module ID>\View; class Terms extends \XLite\View\Terms implements \XLite\Base\IDecorator { /** * Return the path to the directory with the widget template file * * @return string */ protected function getDir() { return 'modules/<your developer ID>/<your module ID>/terms_and_conditions'; } }
-
Re-build the LiteCommerce classes cache (the shop back-end -> "Maintenance" tab -> "Re-Build cache" page) to get the new module listed among other modules on the "Add-ons" page. Then go to that page and enable the module (this will re-build the cache once again).