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

  1. Log in to the Enswitch web interface.
  2. Go to Commerce » Rate plans.
  3. Click on the rate plan you wish to edit.
  4. Click on the "Custom settings" link.
  5. Click on the "New" button.
  6. Choose the setting you wish to add.
  7. Choose which customers the setting applies to.
  8. If your system has multiple languages configured, choose which language your new setting is for.
  9. Click the "Next" button.
  10. 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.
  11. Click the "Save" button.
  12. Enswitch caches custom settings for up to 10 minutes for performance, so the change may not take effect immediately.
  13. Repeat for any other customers or languages as desired.

Uploading logos

Some custom settings, such as logos, are URLs. To configure these:

  1. Create the logos in a graphics program. It is recommended to use the same dimensions as the default logos to preserve the page layout.
  2. Upload them to a web server, which can be the Enswitch web server, or another web server.
  3. 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".
  4. 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:

  1. 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.
  2. 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.
  3. Upload it to a web server in the same way as the logos above.
  4. Create a custom setting in the same way as the logos above.
  5. 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:

  1. 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.
  2. 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:
    plan = <rate plan id>