Discount Center For WHMCS
Are you going to upgrade your WHMCS to version 8.9? Be sure to review our tips in "Update Instructions" to prevent any potential issues!
We are sorry for the inconvenience caused.
Contents |
About Discount Center For WHMCS
Discount Center For WHMCS module allows you to set up discounts for products ordered in a specified combination or quantity. It will let you define discount rules, validity periods, and limitations as well as exclude certain clients from being offered price cuts or promote new customers only! After integrating with Product Cross-Selling For WHMCS, your clients will get the option to track the most appealing discounts among individual product recommendations. |
- Admin Area:
✔ Create Multiple Discounts For Products, Domains And Product Addons |
✔ Create Multiple Quantity Discounts With Thresholds For Products, Product Groups, Domains And Product Addons |
✔ Create Early Payment Discounts |
✔ Configure Module Settings: |
✔ Define Length Of New Client Status |
✔ Auto-Apply Newly Created Discounts |
✔ Select Order Form Type |
✔ Enable Order Notes |
✔ Hide Original Prices |
✔ Enable Product Upgrade/Downgrade Discounts |
✔ View Discount Summary |
✔ View Discounts Logs |
- Client Area:
✔ View Before And After Discount Item Prices |
✔ Build Your Own Discounted Product Bundle |
- Discounts:
✔ Define Items To Apply Discount To: |
✔ Offered Items In Store |
✔ Required Items In Client Shopping Cart |
✔ Active Items In Client Account |
✔ Required Items' Billing Cycles |
✔ Define Discounts For Chosen Items Per Billing Cycle: |
✔ Percentage |
✔ Fixed Amount |
✔ Define Clients To Whom Discount Should Be Applied: |
✔ All Clients And Guests |
✔ New Clients |
✔ Chosen Clients And Client Groups |
✔ Define If Discount Should Be Applied One Time Or Recurring |
✔ Define Time Period For Recurring Discount |
✔ Define Discount Validity Period |
✔ Define If Discount Should Be Applied When Product Bundles Are Enabled |
✔ Define Discounts Limitations: |
✔ Total Number Of Products, Product Addons And Domains |
✔ Maximum Number Of Items In Cart |
✔ Restrict Time Period To Apply Discount After Single Usage |
- Quantity Discounts:
✔ Define Items To Apply Discount To: |
✔ Offered Items In Store |
✔ Required Items In Client Shopping Cart |
✔ Active Items In Client Account |
✔ Required Items' Billing Cycles |
✔ Define Discounts For Chosen Items Per Billing Cycle: |
✔ Percentage |
✔ Fixed Amount |
✔ Define Discount Type: |
✔ Percentage |
✔ Fixed Amount |
✔ Define Items Required To Be In Shopping Cart To Apply Discount |
✔ Define Items Required To Be Owned By Client To Apply Discount |
✔ Define Multiple Promotion Thresholds And Discount Values |
✔ Define Items To Be Summed Up And Compared With Thresholds |
✔ Choose Type Of Discount Application: |
✔ All Specified Items |
✔ More Expensive Than Specified Value |
✔ Less Expensive Than Specified Value |
✔ Chosen Products/Addons/Domains |
✔ Number Of Active Services |
✔ Choose Clients To Which Discount Should Be Applied: |
✔ All Clients And Guests |
✔ New Clients |
✔ Chosen Clients And Client Groups |
✔ Define If Discount Is Of One Time Or Recurring Type |
✔ Define Time Period For Recurring Discount |
✔ Define If Products With 'Allow Multiple Quantities' Should Be Supported |
✔ Define Whether To Count User Owned Services |
✔ Define If Discount Should Be Applied Along With Promotion Code |
✔ Define Discount Validity Period |
✔ Define If Discount Should Be Applied When Product Bundles Are Enabled |
✔ Define Discounts Limitations: |
✔ Total Number Of Products, Product Addons And Domains |
✔ Maximum Number Of Items In Cart |
✔ Restrict Time Period To Apply Discount After Single Usage |
- Early Payment Discounts:
✔ Define Number Of Days Of Discount Validity |
✔ Define Items To Apply Discount To |
✔ Define Discounts For Chosen Items Per Billing Cycle |
✔ Define Email Notifications: |
✔ On Invoice Creation |
✔ On Discount Expiration |
✔ Discount Cancelation Reminders With Defined Number Of Days Before Expiration |
- General Info:
✔ Integrated With Lagom One Step Order Form For WHMCS - Give Clients Instant Preview Of Discounted Prices While Completing The Order |
✔ Integrated With Product Cross-Selling For WHMCS - View Discounts Applied To Related And Recommended Products |
✔ Recognizes Identity Of Not Logged In Client To Assign Discount Accordingly |
✔ Updates Amount On Unpaid Invoices Dynamically When 'Active Services Quantity' Discount Is Used |
✔ Supports Default And Custom Order Forms |
✔ Multi-Language Support |
✔ Supports PHP 8.2 Back To PHP 7.4 |
✔ Supports WHMCS Themes "Six", "Twenty-One" And "Lagom WHMCS Client Theme" |
✔ Supports WHMCS V8.12 Back To WHMCS V8.9 |
✔ Requires ionCube Loader V13 Or Later |
✔ Easy Module Upgrade To Open Source Version |
Installation
This tutorial will show you how to successfully install and configure Discount Center For WHMCS. We will guide you step by step through the whole installation and configuration process. |
1. Log in to our client area and download the module. |
2. In the downloaded file you might find one or two packages that support different PHP versions. In the most recent versions of the module, you will find only one package that supports PHP 7.4 and later. |
Previous updates of the module may contain two packages dedicated to various PHP versions. The first one that supports PHP 5.6 up to PHP 7.3, and the second one addressed to PHP 7.4 up to PHP 8.1. |
Note: You can check the current PHP version in your WHMCS. To do so, proceed to 'Utilities' → 'System' → 'PHP Info'. |
3. Extract the package and upload its content into the main WHMCS directory. The content of the package to upload should look like this. |
4. When you install Discount Center For WHMCS for the first time you have to rename the 'license_RENAME.php' file. This file is located in 'modules/addons/discount_center/license_RENAME.php'. Rename it from 'license_RENAME.php' to 'license.php'. |
5. In order to configure your license key, you have to edit the 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 our client area → 'My Products'. |
6. Now you have to activate the module in your WHMCS system. Log in to your WHMCS admin area. Go to 'System Settings' → 'Addon Modules'. Afterward, find 'Discount Center' and press the 'Activate' button. |
7. In the next step you need to permit access to this module. To do so, click on the 'Configure' button, check required group of administrators and press 'Save Changes'. |
8. Finally, set up the cron command line provided below and define its frequency (once a day interval is recommended).
php -q /yourWHMCS/modules/addons/DiscountCenter/cron/cron.php This will allow to enable sending email notifications, reminders and correct functioning of early payment discounts. |
9. You have just successfully installed Discount Center For WHMCS! You can access your module under 'Addons' → 'Discount Center'. |
Configuration and Management
Discount Center For WHMCS has been created to help you vary your offer with personalized discounts that can be applied to chosen products and/or clients. Configure advanced activation rules to make your offer the most attractive and competitive. |
Configure Discounts
In order to configure your module properly, proceed to 'Addons' → 'Discount Center' and start with setting up rules to offer attractive prices to your clients. |
Standard Discounts
To start, move to the 'Discounts' section. There, press the 'Add New' button. |
You are moved to the 'General' information page of the currently composed discount. Here you have to fill out the form to configure the rule. Select the box to enable the discount, it will be put into practice immediately on creation. You may also configure this option under 'Settings'. |
'Apply Promotion To' - there can be products from your offer, addons and domains. According to a specified rule, pointed here items' price will be adequately changed. Note: You must select at least one promotional product to be allowed to move to the next step. |
Below, you can specify a list of 'Products Required In Cart' that a client must also have in the cart to be entitled to get the discount for promotional products. Among them, there can be again products, addons and domains. In case a client does not have all of the required products in the cart, the discount won't be applied. Surely, you may leave these parts blank if you do not demand any other products to be purchased at the time. Additionally, you may add any items into 'Required Active Products' - a client must already own and have them active. Only then the discount can be applied. |
In the last part you may specify the required billing periods. The discount will be applied only if the items' billing cycle requirement is met. You may specify the required billing cycles for items in the cart. Every item in the cart must have one of the pointed here billing cycles. If an item in the cart is of a different billing cycle than pointed out here, the discount will not be applied. Leave this section blank if the billing cycle is not a demand for you. Press 'Next' to continue. |
Product Discounts
Under 'Product Discounts' you have to set up discount rates for every product's pricing. To do so press the plus button as marked on the screen. |
Enter the discount value and select its type. It can be either percentage that will be counted from the price or a fixed amount by which the final price and/or setup fee will be reduced. In case you are using more than one currency, you may quickly copy the rule to all available currencies to save the time. Press 'Next' when ready. |
Activation Rules
Next, you are moved to activation rules. Here you may decide which of your clients should be entitled to purchase products with a discount. You may grant it to:
Recurring Discounts - enable discount for recurring orders. If you do not select this option, then discount will be applied only once with the first payment. |
Limitation Rules
This section allows limiting the number of applied discounts per client, depending on the criteria defined here:
Press 'Save Changes' to confirm the creation of the new discount. |
All available discounts are now visible, with their name, status and number of assigned products/domains/addons. You may always change the status to disabled/enabled, check starting and ending dates of the promotion and edit the discount or delete it. Use action buttons to do so. |
Quantity Discounts
'Quantity Discounts' - offer different price depending on the number of products added into the cart. Press 'Add New' to begin. |
In the 'General' section you have to name a new discount rule, enable (if you want to apply it immediately on its creation) and select required client products.
Important: Please note that items added into these fields are required. |
Under 'Quantity Discount' you have to decide when the discount will be applicable.
|
|
|
In this section you also have to set up 'Thresholds'. These are the minimum numbers of products, that must fulfill the above application rule, and that must be in the cart of a single order. Specify a percentage discount for the threshold, you can set up more than one. Press the '+' button to add more possibilities. |
|
In 'Thresholds' you set up the minimum number of client's active services which, together with products included in a new order, are taken into account by this application type. For example:
In case there are multiple discount levels configured, the module will adjust the discount to the highest tier possible. For instance:
What is more, if any of active services is terminated and a current number of active services is lower than the one set for the discount, the module removes the discount from all active products. |
The process of increasing and decreasing of the discount levels also apply to unpaid invoices. If the customer has an unpaid invoice and the amount of active services has changed in the meantime, the amount on unpaid invoice will also be updated accordingly. |
When ready, press 'Next' to continue. |
Next, you are moved to 'Activation Rules'. Here, you may decide which of your clients the discount should be entitled to purchase products with a discount.
You can read more about these options and their functions here |
Finally you may set up the limits on the number of applied discounts per client, depending on the criteria defined here:
Press 'Save Changes' to confirm the creation of the new discount. |
All available quantity discounts are now visible, with their name and status. You may always change the status to disabled/enabled, edit the discount or delete it. Use action buttons marked on the screen below to do so. |
Early Payment Discounts
'Early Payment Discounts' option allows creating and applying discounts to selected services when they are paid within defined time range. All you need to do is specify the number of days that the discount will be active since the invoice has been created. |
First of all, like in case of 'Discounts' and 'Quantity Discount' decide whether to enable it on creation and enter the early discount name. Next, you must enter a number of days that the early discount will remain active since the moment the invoice has been created. This is an obligatory field. |
In 'Product Discounts' tab you can define the discount fixed amount or percentage for selected payments and currencies. |
'Email Notifications' - set up reminders for clients to assure they are aware of the early payment benefits. |
Early Discount Notification - select the email templates from available that will be sent to clients when the invoice has been created. The other notification is sent on the day the discount expires. |
Early Discount Cancellation Reminders - select an email template that will be sent to clients just to remind about the early payment discount. Define the number of days before the cancellation date - it will be sent that day. You may specify here more than just one day. Remember to save the changes when the early payment discount configuration is ready. |
The just added Early Payment Discount is now visible on the list. As in case of other discounts types, you may enable/disable it any moment, edit and delete. |
View of the discounted items on an invoice. Please note that the early payment discounts are presented with separate minus values. |
Email Templates
There are three prepared custom email templates with basic information on the discounts:
They are included in the module, once you install or update the module, they will appear in the System Settings → Email Templates → Invoice Messages section. |
Open an email template to see information included in the message. |
You may edit the message, list of supported be the module merge fields:
{$client_name} {$signature} {$invoice_num} {$invoice_date_created} {$invoice_date_due {$invoice_total} {$invoice_balance} {$invoice_html_contents} {$invoice_link} {$earlyPayment.name} {$earlyPayment.due_date} {$earlyPayment.period} |
This is how an exemplary notification sent to a client may look like. |
Additional Options
Settings
Under the 'Settings' tab you must define a few useful options.
Such information is necessary when you select 'New - give promotion to new clients only' option as 'Activation Rule' for any of your set up discounts.
|
Integration Code
A list of available variables that can be inserted into the order form template. These are:
Open the order form you are currently using, for example 'Modern', find 'ordersummary.tpl' file and enter the above variables as shown below: <tr><td>{$producttotals.productinfo.name}</td><td class="text-right"> VARIABLE ONE {$producttotals.pricing.baseprice}</td></tr> <tr><td>+ {$addon.name}</td><td class="text-right"> VARIABLE FIVE </span>{/if} {$addon.recurring}</td></tr> Please note that the below screen is just an example of variable usage, you may simply enter pure variable without any styles or change them according to your needs. |
If entered correctly, your order summary will include the discounts applied, with the new price counted and the final price visible in the order summary. |
Logs
In the 'Logs' tab there are enumerated information on any orders that discounts were applied, such as: invoice number, discount ID and value. |
Clear all the entries or delete only some of them. Use buttons marked on the screen above. |
Dashboard
On the dashboard you can find 'Summary' table with detailed statistics on applied discounts with the most frequently used ones and the highest amount granted. Next to 'Summary' table, a chart can be found with number of discounts applied per specified period of time. You can display the chart per week, month or a year. |
Documentation
The very last tab 'Documentation' once clicked will redirect you to the article you are currently reading! |
Product Cross-Selling For WHMCS Integration
Seamless integration with the Product Cross-Selling For WHMCS enables intelligent expansion of your personalized product offerings, by presenting individualized product recommendations with enticing discounts. Please follow the module's official documentation to learn everything you need to know about the scope of possibilities the module may give you. Meanwhile, look at the picture below and see the client area view with both modules active and configured. Pay attention to the varied "Related Items" and "Recommended Items" sections, which are much-upgraded thanks to the module. |
Tips
1. If a client adds to the cart a product that can have more than one discount applied, then a higher discount is applied on the invoice. |
2. If the 'Active Services Quantity' discount is used and statuses of services are switched manually without using 'Terminate' functionality (this action may be performed either manually or automatically by the system), the module will not take that action into account and thus will not remove the discount. |
3. The Discount Center module supports the WHMCS "Monthly Pricing Breakedown" option which allows showing discounts for quarterly, semi-annual, annual, and biennial prices in the equivalent monthly price. You can read more about this option here. |
4. The Discount Center module supports the WHMCS domain pricing and shows discounted prices of selected TLDs (domain registration and transfer only). You can read more about this option here. |
Update Instructions
Essential guidance through the process of updating the module is offered here. Ensure successful completion of the module update by carefully following each step, thereby preventing data loss or any unforeseen issues. |
Before upgrading your WHMCS to version 8.9.0, it is strongly recommended to perform the following steps:
ALTER TABLE `disccent_EarlyPaymentRecurring` DROP FOREIGN KEY `disccent_EarlyPaymentRecurring_ibfk_1`; ALTER TABLE `disccent_EarlyPaymentRecurring` DROP FOREIGN KEY `disccent_EarlyPaymentRecurring_ibfk_2`; ALTER TABLE `disccent_EarlyPaymentRecurring` DROP FOREIGN KEY `disccent_EarlyPaymentRecurring_ibfk_3`; ALTER TABLE `disccent_EarlyPaymentRecurring` DROP FOREIGN KEY `disccent_EarlyPaymentRecurring_ibfk_4`;
ALTER TABLE `disccent_EarlyPaymentRecurring` ADD FOREIGN KEY (invoice_id) REFERENCES tblinvoices(id) ON DELETE CASCADE; ALTER TABLE `disccent_EarlyPaymentRecurring` ADD FOREIGN KEY (invoice_item_id) REFERENCES tblinvoiceitems(id) ON DELETE CASCADE; ALTER TABLE `disccent_EarlyPaymentRecurring` ADD FOREIGN KEY (early_payment_id) REFERENCES disccent_EarlyPayment(id) ON DELETE CASCADE; ALTER TABLE `disccent_EarlyPaymentRecurring` ADD FOREIGN KEY (early_payment_item_id) REFERENCES disccent_EarlyPaymentItems(id) ON DELETE CASCADE; |
Upgrade Guide
Seeking a solution that offers greater flexibility, customization tailored to your precise needs, and unrestricted availability? There is an option that not only proves to be cost-effective in the long run but also includes prioritized support services, making it a truly valuable investment. Opt for the Open Source version of your Discount Center For WHMCS module to unlock these benefits. Follow a comprehensive guide covering the transition process, the advantages it brings, and step-by-step instructions on what to do next after the order has been successfully finalized. |
Common Problems
1. When you have problems with connection, check whether your SELinux or firewall does not block ports. |
2. The module is currently not compatible with:
|
3. Currently, the configured discount limits are not calculated for product items with multiple quantities. Please do not impose "Limitations" on products with the "Multiple Quantity" option enabled. |