Lagom WHMCS Client Theme offers all the tools you need to overwrite specific theme elements as well as include custom graphics and custom code in theme page files. Take advantage of our ready-made solution and enjoy preparing a collection of customizations that will not be overwritten by future theme updates.
In this part, you will learn how to safely include custom files or graphics in the Lagom WHMCS Client Theme files.
The “Custom CSS File” feature allows you to create your own CSS rules by adding a new file to the existing Lagom Style. This option is completely safe and will not be overwritten by future Lagom WHMCS Client Theme updates.
Style Manager is equipped with the functionality to add Custom CSS rules via the RS Themes addon without the necessity to create a CSS file manually.
/templates/lagom2/core/styles/default/assets/css/
directory located on your WHMCS server.theme-custom.css
file and add necessary custom CSS rules.By default, the Lagom WHMCS Client Theme provides logos for these payment gateways: "Credit Card", "Stripe", "PayPal", "TCO", "Bank Transfer". If you are using a different payment gateway in your system, you can assign a custom icon to this gateway.
Payment Gateway logos are displayed on the checkout page of your ordering process.
In order to assign your new icons, refer to the following steps:
/templates/lagom2/assets/img/
and create the gateways
folder.gateways
folder need to have the correct names. To find out what is the correct name for your graphic, navigate to your client area and add a product to your shopping cart.data-gateway-icon-name
, so for the example presented below, the file should be named authorize.svg
. We only support the .svg
and .png
file formats.By default Lagom contains flags for all WHMCS default languages (opens new window).
There are two ways to customize the flag images - by adding a new language with a new flag, or by replacing the flag for an existing language. Below you will find instructions for both scenarios.
To assign a custom flag to a new language you have added, follow these steps:
/templates/lagom2/assets/img/flags/
.20x15 px
size, it is suggested to use svg
graphics.theme-custom.css
file as described in this article..language-flag.[language_name] {
background: url(../../../../../assets/img/flags/[flag_name].svg);
}
[flag_name]
with filename, which has been uploaded in step 3.[language_name]
with the class assigned to language-flag
class:If you wish to change the flag image for an existing language, follow these instructions:
templates/lagom2/assets/img/flags/custom
.templates/lagom2/core/styles/[your_active_style]/assets/css/
directory on your server and open the theme-custom.css
file.language-flag.flag-[language_name]
and modify file name in the presented URL to align it with name of the file that you have just uploaded:.language-flag.flag-spanish
.language-flag.spanish
{
background: url(../../../../../assets/img/flags/custom/[file_name].svg);
}
You can also display your own HTML code above the default Lagom navigation. In case you need to add your additional CSS code to style a new HTML code, you can create the custom CSS file.
/templates/lagom2/core/layouts/main-menu/default
directory on your WHMCS server.header.tpl
and insert the needed code.Another option is to display your own HTML code above the default Lagom footer. If you need to add the additional CSS code to design the new HTML code, you can add the custom CSS file.
/templates/lagom2/core/layouts/footer/extended
directory on your WHMCS server.footer.tpl
file and insert the needed code.Read this article, if for some reason you can't use Google Fonts, which are used by default in our theme in Style Manager and want to load fonts locally from your own server.
Below example will show how to download "Open Sans" from Google Fonts, and include this font and its files manually to Lagom WHMCS Client Theme.
zip
file, which has been downloaded on your computer..woff
and .woff2
files to /templates/lagom2/assets/fonts/open-sans
on your WHMCS server.theme-custom.css
file based on this article.stylesheet.css
file available in the extracted ZIP archive folder, but remember to correct the URLs to the font files by adding ../../../../../assets/fonts/open-sans/
.@font-face {
font-family: 'Open Sans';
src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'),
url('../../../../../assets/fonts/open-sans/OpenSans-BoldItalic.woff2') format('woff2'),
url('../../../../../assets/fonts/open-sans/OpenSans-BoldItalic.woff') format('woff');
font-weight: bold;
font-style: italic;
font-display: swap;
}
@font-face {
font-family: 'Open Sans';
src: local('Open Sans Light Italic'), local('OpenSans-LightItalic'),
url('../../../../../assets/fonts/open-sans/OpenSans-LightItalic.woff2') format('woff2'),
url('../../../../../assets/fonts/open-sans/OpenSans-LightItalic.woff') format('woff');
font-weight: 300;
font-style: italic;
font-display: swap;
}
@font-face {
font-family: 'Open Sans';
src: local('Open Sans SemiBold Italic'), local('OpenSans-SemiBoldItalic'),
url('../../../../../assets/fonts/open-sans/OpenSans-SemiBoldItalic.woff2') format('woff2'),
url('../../../../../assets/fonts/open-sans/OpenSans-SemiBoldItalic.woff') format('woff');
font-weight: 600;
font-style: italic;
font-display: swap;
}
@font-face {
font-family: 'Open Sans';
src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'),
url('../../../../../assets/fonts/open-sans/OpenSans-SemiBold.woff2') format('woff2'),
url('../../../../../assets/fonts/open-sans/OpenSans-SemiBold.woff') format('woff');
font-weight: 600;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Open Sans';
src: local('Open Sans Bold'), local('OpenSans-Bold'),
url('../../../../../assets/fonts/open-sans/OpenSans-Bold.woff2') format('woff2'),
url('../../../../../assets/fonts/open-sans/OpenSans-Bold.woff') format('woff');
font-weight: bold;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Open Sans';
src: local('Open Sans ExtraBold'), local('OpenSans-ExtraBold'),
url('../../../../../assets/fonts/open-sans/OpenSans-ExtraBold.woff2') format('woff2'),
url('../../../../../assets/fonts/open-sans/OpenSans-ExtraBold.woff') format('woff');
font-weight: bold;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Open Sans';
src: local('Open Sans Regular'), local('OpenSans-Regular'),
url('../../../../../assets/fonts/open-sans/OpenSans-Regular.woff2') format('woff2'),
url('../../../../../assets/fonts/open-sans/OpenSans-Regular.woff') format('woff');
font-weight: normal;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Open Sans';
src: local('Open Sans Medium'), local('OpenSans-Medium'),
url('../../../../../assets/fonts/open-sans/OpenSans-Medium.woff2') format('woff2'),
url('../../../../../assets/fonts/open-sans/OpenSans-Medium.woff') format('woff');
font-weight: 500;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Open Sans';
src: local('Open Sans Light'), local('OpenSans-Light'),
url('../../../../../assets/fonts/open-sans/OpenSans-Light.woff2') format('woff2'),
url('../../../../../assets/fonts/open-sans/OpenSans-Light.woff') format('woff');
font-weight: 300;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Open Sans';
src: local('Open Sans Italic'), local('OpenSans-Italic'),
url('../../../../../assets/fonts/open-sans/OpenSans-Italic.woff2') format('woff2'),
url('../../../../../assets/fonts/open-sans/OpenSans-Italic.woff') format('woff');
font-weight: normal;
font-style: italic;
font-display: swap;
}
@font-face {
font-family: 'Open Sans';
src: local('Open Sans ExtraBold Italic'), local('OpenSans-ExtraBoldItalic'),
url('../../../../../assets/fonts/open-sans/OpenSans-ExtraBoldItalic.woff2') format('woff2'),
url('../../../../../assets/fonts/open-sans/OpenSans-ExtraBoldItalic.woff') format('woff');
font-weight: bold;
font-style: italic;
font-display: swap;
}
@font-face {
font-family: 'Open Sans';
src: local('Open Sans Medium Italic'), local('OpenSans-MediumItalic'),
url('../../../../../assets/fonts/open-sans/OpenSans-MediumItalic.woff2') format('woff2'),
url('../../../../../assets/fonts/open-sans/OpenSans-MediumItalic.woff') format('woff');
font-weight: 500;
font-style: italic;
font-display: swap;
}
Open Sans
name in "Use Custom Font" field, available in Style Manager settings.If your country requires extra checkboxes to be selected during the ordering process, we've provided a solution for this. You can now create checkboxes for GDPR, Privacy Policy, or other confirmations. These will appear below the standard WHMCS "Terms of Service" checkbox, as detailed in the following instructions.
templates/orderforms/lagom2/includes/viewcart/
directory on your server.custom-tos.tpl
.Create necessary code to newly created file, by following below example.
data-form-input
attribute. In our exmple we'll use #custom-accept-tos
name, as shown below:<div class="order-checkbox" data-form-input="#custom-accept-tos">
</div>
ID
attribute with your custom name, created in first step. In our example ID attribute will be custom-accept-tos
. Do not change anything else in below code:<div class="order-checkbox" data-form-input="#custom-accept-tos">
<div class="checkbox m-t-0 m-b-1x">
<label>
<input class="icheck-control" type="checkbox" data-custom-tos id="custom-accept-tos" />
</label>
</div>
</div>
<div class="order-checkbox" data-form-input="#custom-accept-tos">
<div class="checkbox m-t-0 m-b-1x">
<label>
<input class="icheck-control" type="checkbox" data-custom-tos id="custom-accept-tos" />
<span>[Custom checkbox label text] <a href="https://customcheckbox.com" target="_blank">[link]</a></span>
</label>
</div>
</div>
<div class="order-checkbox" data-form-input="#custom-accept-tos">
<div class="checkbox m-t-0 m-b-1x">
<label>
<input class="icheck-control" type="checkbox" data-custom-tos id="custom-accept-tos" />
<span>[Custom checkbox label text] <a href="https://customcheckbox.com" target="_blank">[link]</a></span>
</label>
</div>
<div class="alert alert-lagom alert-xs alert-danger m-b-2x hidden">
<div class="alert-body">
[Alert Message]
</div>
</div>
</div>
The Lagom WHMCS Client Theme is made up of small elements that can be easily overwritten using the functions described below. The following functionality is completely safe and your changes will not be overwritten by future Lagom product updates. However you need to remember to compare and merge changes from latest Lagom release as described in "Customization Compatibility"
You can find a list of files that can be overwritten below.
/templates/lagom2/includes/
/templates/lagom2/store/
/templates/lagom2/markdown-guide.tpl
/templates/lagom2/supportticketsubmit-customfields.tpl
/templates/lagom2/supportticketsubmit-kbsuggestions.tpl
/templates/lagom2/twitterfeed.tpl
/templates/lagom2/viewemail.tpl
To overwrite any other file located in /templates/lagom2/
and /templates/orderforms/lagom2/
, you need to create Page Template.
In order to overwrite one of the above files, refer to the following instruction:
overwrites
folder in its location./templates/lagom2/viewemail.tpl
file, then the location of the overwritten file should be /templates/lagom2/overwrites/viewemail.tpl
.{else}
and {/if}
tags.To overwrite any other file located in /templates/lagom2/
and /templates/orderforms/lagom2/
, you need to create Page Template.
To overwrite any layout, you ned to follow below documentation articles:
If you decide to overwrite any of existing Lagom WHMCS Client theme SVG icon or illustration, you have the ability to do so. You can overwrite these files, by creating custom
folder in one of these locations:
/templates/lagom2/assets/svg-icon
/templates/lagom2/assets/svg-illustrations
For example if you'd like to overwrite /templates/lagom2/assets/svg-icon/article.tpl
file, you need to create /templates/lagom2/assets/svg-icon/custom/article.tpl
file.
Remember that all Lagom icons and illustrations are included in our theme as "SVG Code", that's why created file need to have .tpl
extension.
WHMCS delivers the possibility to include the custom code in different locations using WHMCS hooks (opens new window), for example: