Custom settings allow you to set how customers see the web interface. You can set the subjects and bodies of emails, the design of invoices, etc. These are set per rate plan, so you can have different settings for different customers. These settings affect your customers, your customers' customers, and so on, unless your customers who are resellers override the custom settings in their own rate plans. If you are the system owner, you can set custom settings for your own rate plan (the plan with id 1), which affects all customers on the system including yourself.
To add a custom setting
- Log in to the Enswitch web interface.
- Go to Commerce » Rate plans.
- Click on the rate plan you wish to edit.
- Click on the "Custom settings" link.
- Click on the "New" button.
- Choose the setting you wish to add.
- Choose which customers the setting applies to.
- If your system has multiple languages configured, choose which language your new setting is for.
- Click the "Next" button.
- Enter the value you wish customers to see. Most settings can be either text or HTML. This includes email bodies, but not email subjects which must be text only.
- Click the "Save" button.
- Enswitch caches custom settings for up to 10 minutes for performance, so the change may not take effect immediately.
- Repeat for any other customers or languages as desired.
Uploading logos
Some custom settings, such as logos, are URLs. To configure these:
- Create the logos in a graphics program. It is recommended to use the same dimensions as the default logos to preserve the page layout.
- Upload them to a web server, which can be the Enswitch web server, or another web server.
- Create the custom setting as above. If you have uploaded the logo files to the enswitch machine, you can use a relative URL, for example "/local/my_logo.gif". If you have uploaded to another machine, you should use the full URL, for example "http://my.logo.server/my_logo.gif".
- The new web interface will try replacing the extension of any graphic file with .svg, and see if that file exists. If it does not the original file name will be used. It is recommended to use .svg files with the new web interface.
The old web interface has a symbolic link from /local/ to /etc/enswitch/www/, so you can put files in /etc/enswitch/www/ and reference them as /local/, and these will not be destroyed by Enswitch upgrades. For example, you can create "/etc/enswitch/www/my_logo.gif", and reference it as "/local/my_logo.gif" in the custom setting. The new web interface is the same, but uses /etc/enswitch/web/ instead of /etc/enswitch/www/.
The default image sizes in pixels are:
Image | Width | Height |
---|---|---|
Header background | 5 | 60 |
Home page | 380 | 285 |
Title image (right side background) | 380 | 60 |
Title | 188 | 60 |
These are for the old web interface. The new interface uses .svg files which are scalable in size.
Uploading a CSS file
To change the colours on Enswitch, you will need to produce a custom CSS file. To do this:
- For the old web interface, download the "http://<your enswitch server>/css/default/common.css" file. The new web interface does not have a human-readable .css file, and you can use your web browser's inspector to view the style information and find class or element names.
- Make a new file with any elements you want to change. Call it "local.css" or similar. It only needs to include changed elements, not all the elements. Keeping this file as small as possible will reduce the chances of it conflicting with a future Enswitch release.
- Upload it to a web server in the same way as the logos above.
- Create a custom setting in the same way as the logos above.
- The login page will not be affected by this CSS file. Since the user has not yet logged in we don't know which rate plan to use, but it can be configured as below.
Configuring a rate plan for login
This must be done by the system owner. To set the rate plan for the appearance of the login page:
- For the old web interface, edit the Apache configuration and add "PerlSetEnv login_plan <rate plan id>" within the <Files *.pl> section. You will need to do this for each VirtualHost.
- For the new web interface, create a file /etc/enswitch/web/domains.ini on the web server, and within it add a stanza for each domain in the following format:
[example.domain.com] plan = <rate plan id>