Personal tools
Namespaces

Variants
Actions

Multibrand 1.X For WHMCS

From ModulesGarden Wiki
(Difference between revisions)
Jump to: navigation, search
(Limitations)
(Requirements)
Line 641: Line 641:
 
===Requirements===
 
===Requirements===
 
{|
 
{|
|style="padding: 10px 0px 20px 15px;"|Below we will list elements requiring special attention in order to work correctly.<br />
+
|style="padding: 10px 0px 20px 15px;"|Below we will list elements that require special attention in order to work correctly.<br />
*'''Product Bundle''' - bundle requires all of it's product to be assigned to the same brands that the product bundle is.
+
*'''Product Bundle''' - bundle requires all of its products to be assigned to the same brand that the product bundle is.
 
|}
 
|}
  

Revision as of 16:02, 2 November 2015

Contents

About Multibrand For WHMCS

Multibrand For WHMCS will allow you to manage multiple brands on multiple websites while using just a single WHMCS installation.

You will be able to customize your brand through modifying factors like client area template, logo or brand language, and preview the changes with just a single click.
The module enables you to easily assign your clients to and migrate them between brands, as well as assign products and ticket departments to each brand.
Owing to Multibrand For WHMCS your customers will be able to log into specified client areas in accordance with the brand under which they purchased a product or service.

  • Admin Area Features:
✔ User Friendly Management Of Multiple Brands
✔ Easy Modification Of Existing Brands
✔ Assign/Unassign Clients To Multiple Brands
✔ Assign Products To Brands
✔ Assign Product Bundles To Brands
✔ Assign Ticket Departments To Brands
✔ Configure Payment Gateways For Each Brand Separately - PayPal And 2CheckOut (beta)
✔ Display Active Clients, Invoices, Orders, Tickets And Services Associated To Brands
✔ Quick Preview Of The Branded Client Area
✔ Publish/Unpublish Brands On Click
✔ Set Brand As Default - Automatic Assignment Of New Clients
✔ View Brand Reports - The List Of Clients, Invoices, Orders, Tickets And Services
✔ View Dynamic Brands Comparison Reports - Various Graph Types
✔ Generate Separate Email Templates For Each Brand
✔ Verify Integration Of Templates Used By Brands
  • Admin Area Features:
✔ Order Branded Products
✔ Create Branded Invoices
✔ Create Branded Quotes
✔ Open Branded Tickets
✔ Log In As Client To Chosen Brand
  • Client Area Features:
✔ Displayed Client Area Template And Default Language Depend On The Brand
✔ Access To Products, Invoices, Ticket Departments and Payment Gateways Assigned To The Brand
✔ Receive Branded Emails And Invoices
✔ Unbranded Clients Can Only Log Into The Default Brand
✔ Branded Clients Can Only Log Into The Brand They Are Assigned To
✔ Multibranded Clients Can Log Into All Existing Brands With The Same Access Details
  • Brand Configuration:
✔ Default Brand For New Accounts
✔ Brand Name
✔ Company Name
✔ Brand URL Address
✔ Brand Logo
✔ Brand Language
✔ Brand Template
✔ Brand Address
✔ Brand Signature
✔ Brand Email
✔ Brand Graph Color
✔ Brand Terms Of Service URL
  • General Info:
✔ Multi-Language Support
✔ Requires PHP 5.3 and Later
✔ Supports WHMCS Templates Five and Six
✔ Supports WHMCS V5 and V6

Installation

This tutorial will show you how to successfully install and configure Multibrand For WHMCS.

We will guide you step by step through the whole installation and configuration process.

Installation

1. Log in to your client area and download Multibrand For WHMCS.
MB 1.png
2. Upload and extract the module into the main WHMCS directory.

Files in your WHMCS directory should look like these.

MB 2.png
3. When you install Multibrand for the first time you have to rename 'license_RENAME.php' file.

File is located in 'modules/addons/MultibrandFunctionality/license_RENAME.php'. Rename it from 'license_RENAME.php' to 'license.php'.

MB 3.png
4. In order to configure your license key, you have to edit a previously renamed 'license.php' file.

Enter your license key between quotation marks as presented on the following screen. You can find your license key in your client area → 'My Products'.

MB 4.png

Activating Addon Module

5. Now you have to activate the module in your WHMCS system.

Log in to your WHMCS admin area. Go to 'Setup' 'Addon Modules'. Afterwards, find 'Multibrand' and press 'Activate' button.

MB 5.png
6. In the next step you need to permit access to this module.

To do so click on 'Configure' button, tick 'Access Control' near required admin role groups and press 'Save Changes'.

MB 6.png

Additional Settings

7. Now, set up 'logos' folder as writable.

Folder is located in 'you_whmcs/modules/addons/MultibrandFunctionality/storage/'.

MB 7.png
8. The last step is proceeding with integration code.

Integration code can be found under 'Addons' 'Multibrand' 'Settings' 'Integration Code'.

MB 7 1.png
9. You have just successfully installed Multibrand For WHMCS!

You can access your module in 'Addons' 'Multibrand'.

MB 8.png

Configuration and Management

In this section we will show you how to properly set up and use Multibrand For WHMCS.

Dashboard

Under 'Dashboard' you can find basic information about the module and current status of 'logos' folder.

It is required to set up 'logos' folder as writable in order to upload logos of your brands.
Additionally, here you can find links to articles that will guide through the set up of CNAME records process in the most popular platforms.

MB 9.png

Brands

'Brands Management' tab allows you to create and manage your brands using a single instance of WHMCS solution.

New Brand

Let's start by creating a new brand. For that purpose go to 'Brands' tab and press 'Create New Brand' button.
MB 10.png
Now, fill out 'Brand Base URL', 'Brand Email', 'Brand Name', 'Company Name', 'Address', 'Terms of Service URL' and 'Signature' with desired values.
  • 'Address' - value from this field will be used as a company address and will be displayed for example on created invoices.
  • 'Brand Email' - will be used to send branded emails to clients.
  • 'Terms of Service URL' - defines URL to Terms of Service for the brand.
MB 11.png
Afterwards, select desired brand language, template and brand color.

Additionally, upload the logo which will be used in branded invoices, emails and client area.
Finish through deciding whether to set this brand as default and press 'Save Changes'.
Note: New users created by admin or through API will be assigned to the default brand.

MB 12.png
Now, proceed to 'Settings' → 'Integration Code' and check whether chosen template is integrated correctly with Multibrand.
The last step is setting up DNS record, which will point from branded domain towards your main domain used by WHMCS.

To learn more about setting up CNAME records, proceed to Creating CNAME Records section.
Do not forget to publish the brand as soon as the CNAME record propagates worldwide.

Management of Existing Brands

To manage your brand, press 'Manage' button next to it as shown on the following screen.

General

General tab contains configuration of the brand.

You can modify your brand at any time, simply alter wanted parameters and press 'Save Changes'.

MB 13.png

Products

This tab allows you to assign products and product bundles configured in your system to the brand.

Note: Products/product bundles can be assigned to multiple brands at the same time.

MB 14.png

Ticket Department

Here you can choose ticket departments available from the brand.

'Important': Only one brand for each department is allowed.

MB 15.png

Payment Gateway

This tab allows you to configure payment gateway for the brand.

To enable payment gateway, mark checkbox next to it, fill out required details and press 'Save Changes' .
Note 1: Remember, to use branded payment gateway you need to activate it first under 'Setup' → 'Payments' → 'Payment Gateways'.
Note 2: Owing to 'Payment Gateway' tab, you can use different details per brand.
Note 3: 2CheckOut payment gateway currently supports only single payments.

MB 18.png

Email Templates

Here you are able to generate email templates for the brand only.

Check 'Create Brand Templates' and press 'Save Changes' to create them.

MB 19.png

Back To Brand Management

Alternatively, you can edit brand values visible in 'Brand Management' tab by pressing them.

Choose/type in the desired value and confirm changes.

MB 20.png
Each brand can be disabled/enabled through pressing 'Published'/'Unpublished' (red) or set up as default through clicking on 'Default' (blue) button.

Both of them are placed in 'Change Status' column as shown on the screen below.

MB 21.png
In order to view the details of a brand, press 'Toggle Details' button next to the brand.

Here you can find basic information about the brand as well as quick access links to the brand reports.

MB 22.png
You can also view the client area of the brand through pressing 'Preview' button.

The client area should appear in a popup window as shown on the following screen.
You can easily log into/register client account via this popup window.

MB 23.png

Clients

Any client can be in one of the three states:
  • branded - a client with only one brand assigned. They will be able to log into the brand they are assigned to.
  • semi multi-branded - a client assigned to multiple brands. They will be able to benefit from all brands they are assigned to.
  • fully multi-branded - a client with no brands assigned, such client will be able to log into any of your brands.

Additionally, if they own products from different brands, they will be fluidly redirected between brands when viewing them.

In 'Clients' page you can assign clients to chosen brands.
Note: It's worth mentioning that client can be assigned to multiple brands.
Note 2: We were forced to abandon quick reassigning clients due to optimization reasons.

MB 23 1.png
You can search clients by client name, email and company.
MB 23 2.png

Brand Reports

In 'Brand Reports' tab you can easily view the reports concerning specific brands.

You can view the reports of clients, invoices, orders, tickets and services bounded to the selected brand.

MB 24.png
In addition, you can select the quantity of records per page, search a specified record and sort records by selected column.
MB 25.png
You can also compare all your brands using tabs marked on the following screen.

Here you can compare them by the amount of clients, orders, services, tickets, invoices, domains and income with various graph types.
On the following screen you can see a web graph with a popup containing the amount of services in brands.
Popups with different information are shown upon hovering over specified parts of graph.

MB 26.png

Settings

Under settings you can find migration tool, integration code and direct link to the article you are currently reading.

Integration Code

This integration code is required for correct branding.
MB 26 1.png

Migration Tool

Migration tool allows you to migrate data from Multibrand For WHMCS in version earlier than 1.6.0.

Important: Migration disables branded payment gateways. You have to manually re-enable them.

MB 26 2.png

Membership In The Admin Area

Multibrand For WHMCS makes management of WHMCS easier through introducing 'Brand Details' column.

'Brand Details' column informs you about membership of clients, invoices, tickets, orders or services in certain brand.
Let's see how it looks in a 'Client List'.

MB 27.png
In 'Order List' it looks similar.

Through pressing a brand name, you will be moved directly to a report page of that brand.
Notice: Client, service etc. status has to be set to active in order to show brand it is assigned to.

MB 28.png

Invoices/Tickets/Quotes Creation From Admin Area

Due to multibranded clients, they will get invoices/tickets/quotes from multiple brands.

Therefore, you as an administrator have to be able to define from which brand create them.
As you can see on the following screen, from the summary page you can create all of mentioned above as well as log into any of client's brands.

Important: Those can be done only from client summary page in the admin area, other possibilities of creating invoices/tickets/quotes was blocked.

MB 28 1.png
From 'Invoices' tab you can choose brand for a new invoice.
MB 28 2.png
While 'Quotes' tab enables you to choose brand for a new quote.
MB 28 3.png

Branded Client Area

Multibrand For WHMCS offers multiple client areas in one solution and lets you have your clients assigned to them.
MB 29.png
On the following screen you can see invoices generated for a brand.
MB 30.png

Branded Email Templates

Brand settings also apply to emails sent to clients.

On the following screen you can see an example of an order email.

MB 31.png
More About Email Branding

Let's consider how WHMCS has implemented email templates system:

  • there are a few email types: general/product/domain/invoice
  • there are a lot of default WHMCS templates in the system. These kinds of templates are "special" in a few ways.
  • we have only one tool that allows us to adjust emails (link)


How does email branding mechanism look like?

  1. Client enters the site which uses brand #1, and orders a product.
  2. WHMCS creates an order and performs email sending Hosting Account Welcome Email
  3. Using hook, we get:
    • Unique email template name, in this case Hosting Account Welcome Email
    • Parameter 'relid' which, depending on the email type, may be the ID of various entities:
      • for 'general' email type, it is Client ID
      • for 'product' email type, it is Service ID
      • for 'domain' email type, it is Domain ID
      • for 'invoice' email type, it is Invoice ID
    • Basing on that email unique name we are going to determine 'relid' type, so if a unique name contains "Hosting Account Welcome Email" string, we know that 'relid' is a service ID.
  4. Now, we need to determine the brand, so we use the brand of the service ('relid' is in this case our service ID; service brand is a brand from which it was ordered)
  5. As service is created for brand #1, we can obtain this specific brand details
  6. In the next step, all default variables for this email are overridden using once specified brand, such as:
    • company_name, company_domain, whmcs_url, whmcs_link, from (email and name), logo_url
    • As a result you have the same email subject/content with different stack of variables. Email sent from will be changed as well.
  7. In the last step, there is one significant mechanism: (let's just say, that it is the last resort mechanism)
    • When we determine brand, for example MyBrand is a brand name
    • Hook checks if email template with unique name exists: $currentBrand->name.' '.$emailUniqueName (prefix + space + the same unique name)
    • If it exists, the hook disables sending email by WHMCS and the module will send email with found template by our own Mailer
      (as a result, you will find in logs that email was aborted, and it will not be displayed in the list of emails sent to client)


Note: there is much more logic behind that, it is just an overview.

Point is, for predefined email templates everything works fine.
But as soon as admin specifies their own, custom template, and sets it manually to the product, there might be a problem.

So, as you set welcome email to your custom MyBrand Card Brief. Basing on this, we are unable to determine a proper brand.
But when I make the same email, with a unique name Other Product/Service Welcome Email for Copy Brief, it will work.
Why? There is a string inside the email name Other Product/Service Welcome Email so we know it is related to a product.
Following, we are able to get brand attached to that product and then we can brand this template.

Whole idea of this is that we have email, but we do not know for which brand it should be branded.
It is important for current Multibrand state to keep email templates unique names in proper pattern.

Creating CNAME Records

In this section you will find guides on how to create CNAME record in popular control panels.

For instance, if your branded domain is reseller.com and domain with your WHMCS is whmcs.domain.com, your CNAME will be 'www.reseller.com. CNAME whmcs.domain.com.'.
Note 1: As you can see above, each domain has to be closed with a dot.
Note 2: To learn more about certificate requirements, visit Common Problems section.

cPanel

1. Log into your cPanel.
2. Press 'Simple DNS Zone Editor' under 'Domains' section.
3. Select the domain you wish to manage from the menu.

Note: This step is required only if you own more than one domain.

4. Fill in 'Name' and 'CNAME' record and press 'Add CNAME Record' .

Note: To define record's TTL, you have to use 'Advanced DNS Zone Editor'.

DirectAdmin

1. Log into your DirectAdmin.
2. Click 'DNS Administration' .
3. Afterwards, press select the desired domain.
4. Fill in the full domain/subdomain into the CNAME record and press 'Add' next to it.

Note: Do not forget to place a dot at the end.

Plesk

1. Log into your Plesk panel.
2. Press 'Domains' under 'Hosting Services' section.
3. Find the domain to be edited, and click on the corresponding Control Panel link.

Afterwards, proceed to 'Websites & Domains' tab and press 'DNS Settings' .

4. Find the domain to be edited, and click on the corresponding Control Panel link.

Afterwards, proceed to 'Websites & Domains' tab and press 'DNS Settings'.

5. Add a new record or edit an existing one.
6. Now, change the record type to 'CNAME' and fill in both 'Domain name' and 'Canonical name'.

Finish by pressing 'Ok'.
Note: The changes will take between 4 to 8 hours to update worldwide.

SSL Certificate

In this section you will find all information related to SSL certificate in WHMCS using Multibrand.

If your branded domains or WHMCS domain are using SSL connection, all of them need to have the same certificate.
Certificate Type Required:

  • wildcard - if all brands and main WHMCS are using the same domain.
  • SAN - if your brands and main WHMCS are using different domains.

This is due the way in which WHMCS works. It is not the limitation of our module.
Additionally, in order to fix connection support for secured connections, add the integration code shown below.
Edit 'configuration.php' located in the main WHMCS directory and place following code at the end of the file.

require_once dirname(__FILE__).'/includes/MultiBrandSSLFixer.php';
$SSLFixer = new MultiBrandSSLFixer();

if($SSLFixer->shouldBeInSSL()){
    if(! $SSLFixer->isInSSL()){
        $SSLFixer->forceRedirect(true);
    }
}else{
    if($SSLFixer->isInSSL()){
        $SSLFixer->forceRedirect(false);
    }
}

cPanel

Installing SSL certificate for domains managed from cPanel consists of the following steps:
1. Log into your cPanel and press 'SSL/TSLS Manager' under 'Security' section.
2. Click on 'Manage SSL sites' under 'Install and Manage SSL for your site(HTTPS)'.
3a. (installing the certificate) Select the domain, paste certificate and private key and save the settings.

3b. (using already installed certificate) Select it from 'Browse Certificates' and save the settings.

Branding Limitations & Requirements

Limitations

WHMCS

In this section we will list the parts of WHMCS which cannot be branded or may be working in an odd way.

  • Bridges - Multibrand For WHMCS does not support any kind of bridges (WordPress, Jomla).
  • Link replacement - currently links are replaced with their branded counterparts with a visible delay.
    Currently this is the only way we could do that.
  • Clients Profile → Send Email - if you try to send an email template, a branded counterpart of which exists, you will receive an error.
    This is due to its branded counterpart being sent, while default email is blocked.
  • Branded Quote → Duplicate - duplicating a branded quote results in receiving unbranded quote.
  • Emails - not branded due to the lack of possibility to determine from which brand an email should be sent:
    • Affiliate Monthly Referrals Report
    • Clients Only Bounce Message
WHMCS Modules

In this section we will list the WHMCS modules which do not support multibranding or do not cooperate with Multibrand For WHMCS at all.

  • SMS Center For WHMCS - SMS sent to customers cannot be branded. Default set of SMS templates is sent to clients from all brands.
  • Resellers Center For WHMCS - may work in an odd way because of redirection attempts of both modules.

Requirements

Below we will list elements that require special attention in order to work correctly.
  • Product Bundle - bundle requires all of its products to be assigned to the same brand that the product bundle is.

Tips

1. The logo image is usually hard coded into the WHMCS template files.

In order to use logo file provided in the 'Multibrand For WHMCS' module, find proper line at the template file and replace it with '{$logo}' variable.
The line responsible for a displayed logo is placed at the 'header.tpl' file located in a currently used template.

Common Problems

1. When you have problems with connection, check whether your SELinux or firewall does not block ports.
2. Using 'Login as Client' functionality returns:
The page isn't redirecting properly

Solution: This issue will be solved in the next version of module.

3. If your CNAME record is not working, remember that first domain name in CNAME record should be branded domain.

The second one is the domain on which you have your WHMCS. The redirection goes from the first domain to the second.
Dots after domains are also important.
Take note that there could be a delay with propagation of changes for DNS servers while using A type CNAME records.

4. If your branded domain or WHMCS domain are using SSL connection, both of them need to have the same certificate.

If both of them are using the same domain, you will need a wildcard certificate.
If they are using different domains, secure them with the SAN certificate.
This is due the way in which WHMCS works. It is not the limitation of our module.

Navigation
WHMCS Modules
WHMCS Widgets
Translations
cPanel Modules
General
FAQ
Community