Personal tools
Namespaces

Variants
Actions

Product Linker For WHMCS

From ModulesGarden Wiki
Jump to: navigation, search

Contents

About Product Linker For WHMCS

Product Linker For WHMCS enables you to establish dynamic connections between products, addons, and configurable options.
This facilitates bundled purchases for customers, supported by flexible discounts.

The module also provides an intuitive interface for viewing, filtering, and managing existing product associations, giving you full control over the active connections used by your clients.

  • Automation Features:
✔ Handle Dependencies Between Module Actions:
✔ Each Create/Terminate/Suspend/Unsuspend Action Performed On Main Product Triggers Such Action On Child Products
✔ Copy Configurable Options From Parent To Child Product
  • Admin Area Features:
✔ Define Relations Between Chosen Products And:
✔ Product Addons
✔ Configurable Options
✔ Linked Products
✔ Define If Product Addon Price Should Be Switched With Linked Product Price
✔ Copy Custom Fields Between Configured Relations
✔ Assign Custom Promo Codes To Relations:
✔ Select Discount Priority
✔ Define Minimum Discount Amount
✔ View, Filter And Delete Existing Connections Between Linked Products
✔ Enable Related Products Notices In Client Cart
✔ View Product Upgrades/Downgrades Tasks Queue
✔ Customize Module Language Files With "Translations" Tool
✔ View And Manage Logs
  • Client Area Features:
✔ Purchase Multiple Products, Addons And Configurable Options By Ordering Just One
✔ View Linked Product Added To Order After Relation Is Triggered
  • General Info:
✔ Integrated With cPanel Manage2 For WHMCS - Easy Reselling Of cPanel Licenses
✔ Integrated With DirectAdmin Licenses For WHMCS - Easy Reselling Of DirectAdmin Licenses
✔ Integrated With Plesk Key Administrator For WHMCS - Easy Reselling Of Plesk Licenses
✔ Multi-Language Support With Custom Translations Tool
✔ Supports PHP 8.2 Back To PHP 8.1
✔ Supports WHMCS Themes "Six" And "Twenty-One"
✔ Supports WHMCS V8.11 Back To WHMCS V8.8
✔ Requires ionCube Loader V13 Or Later
✔ Easy Module Upgrade To Open Source Version

Installation

This tutorial will show you how to successfully install Product Linker 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.
PL3 0.png
3. Extract the package and upload its content into the main WHMCS directory.

The content of the package to upload should look like this.

Gfhdr.png
4. When you install Product Linker For WHMCS for the first time you have to rename 'license_RENAME.php' file.

The file is located in 'modules/addons/ProductLinker/license_RENAME.php'. Rename it from 'license_RENAME.php' to 'license.php'.

PL3 1.png
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'.

PL4.png
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 'Product Linker' and press the 'Activate' button.

PL3 3.png
7. In the next step, you need to permit access to this module.

To do so, click on the 'Configure' button, select administrator groups that should have access to this addon and press 'Save Changes'.

PL3 4.png
8. Optionally, set up a cron job, that automatically terminates linked products when the main product is upgraded/downgraded.
5-minute interval is recommended, the cron can be run as often as every minute, but at the cost of increased WHMCS server load.
php -q /your_WHMCS/modules/addons/ProductLinker/cron/cron.php queue
9. You have just successfully installed Product Linker For WHMCS!

You can access your module at 'Addons' 'Product Linker'.

PL3 5.png

Configuration and Management

Product Linker For WHMCS allows to sell bundles of products through ordering one product with specific product addons and configurable options.

It also automatically forwards basic commands from the main product to all child products.
You can define the relationship between products through a product add-on or configurable option.

Basic Relations

At the 'Basic Relations' tab you can define links between products through product addons and configurable options.

They will be triggered once your client makes an order for a product with the product addon/configurable option chosen at the relation.
Additionally, you can define a discount added to the order by triggering the relation.
To add a new relation, go to 'Relations' 'Basic Relations' and click on 'Add Relation'.

PL3 6.png
To set up a relation:
  • Type - Choose a relation type from the 'Type' dropdown menu, selecting either a relation triggered by a product addon or a configurable option.
  • Addon/Configurable Option - Select a product addon or configurable option that will trigger the relation.
  • Swap Price - If you select the 'Addon' type, you can also enable the 'Swap Price' option, which will overwrite the price of the linked product with the addon price.
  • Configurable Option Value - if you choose the 'Configurable Option' relation type, you must also select a specific configurable option.
  • Linked Product - select a child product that will be linked after the relation is triggered. This product should be set to 'hidden' and 'free'.
  • Promotion - optionally, choose a discount that will be added to the order.
    Note: Keep in mind that only one discount can be assigned to an order, and you can manage discount assignments on the 'Settings' page.
  • Copy Custom Fields - decide if you want Custom Fields copied from the main product to the linked product.
    Note: The Custom Fields are copied from the main product, not from the addon.
PL3 7.png
Added relations can be edited or deleted by using the relative action buttons.
PL3 8.png

Product Relations

At the 'Product Relations' tab you can set up a relation linking one product with another.

To create a new configuration simply click on the 'Add Relation' button.

PL3 9.png
Provide the following information to create the relation:
  • Main Product - choose a product from the 'Main Product' dropdown menu to trigger the relation.
  • Linked Product - select a product from the 'Linked Product' dropdown menu that will be added when the relation is triggered. This product should be set to 'hidden' and 'free'.
  • Promotion - optionally, assign a promotion.
  • Configurable Option Groups - select configurable options to transfer values for.
    Note: Configurable option copying can only be enabled if the configurable option is assigned to both the parent and child products.
  • Copy Custom Fields - decide if you want Custom Fields copied from the main product to the linked product.
PL3 10.png
Created product relations can be edited or deleted by clicking on the respective action buttons.
PL3 11.png

Existing Connections

'Existing Connections' tab allows you to view the list of all products ordered by your clients for which relations exist.

You can find all the information about a relation, like the main product, linked product, their owner, or domain used by both products.
If a need arises, you can also delete a connection and optionally terminate the linked product.
Note: Keep in mind that 'Suspend', 'Unsuspend' and 'Terminate' actions performed on the Main Product will be reflected on the Linked Product.

PL3 12.png

Settings

Due to the assignment of promotions to the relation, a situation may occur where multiple promotions will be assigned to one order.
WHMCS does not support such a situation, therefore only one promotion has to be chosen.
  • Highest Discount - the promotion giving the highest discount to your clients will be chosen in the order form.
  • Lowest Discount - the promotion giving the lowest discount to your clients will be chosen in the order form.
  • Minimum Reduction Amount - if the 'Lowest Discount' is selected, provide the lowest reduction value (order subtotal * promotion rate) that can be used.
    If the promotion value is below the limit, a higher discount will be applied until the provided amount is met or exceeded.
  • Display Product Info - information about the linked product will be visible on the order form when this option is enabled.


Minimum Reduction Amount Example:

 Client's order qualifies for 3 discounts: 20%, 50% and 80%
 We have set the Discount Priority to 'Lowest Discount'
 The Minimum Reduction Amount is set to '10'

 The order subtotal is '36.39'
 The reduction is calculated:
 36.39 * 20% = 7.28
 36.39 * 50% = 18.20
 36.39 * 80% = 29.11

 Since the calculation with the lowest discount did not exceed the 'Minimum Reduction Amount', the next discount (50%) is applied as it does exceed the minimum.
PL3 13.png

Queue

The 'Queue' section is designed to handle product upgrades and downgrades for products that have a relation established.

The cron will automatically create tasks to terminate linked products after upgrade/downgrade of the main product.
If you allow your clients to upgrade/downgrade products that you have created relations for, it is recommended to run a dedicated cron job every 5 minutes:

php -q /your_WHMCS/modules/addons/ProductLinker/cron/cron.php queue

The table below the cron job information will allow you to see the status of each task, see its details, run it manually, or delete it.

PL3 12 1.png
You can delete multiple tasks at once by using the mass action function.
PL3 12 2.png
Additional actions include the auto prune system and the ability to hide the cron information.
PL3 12 3.png

Translations

Customizing language files is now extremely easy with the "Translations" tool that is now available directly in the addon.
Its user-friendly design makes managing various language file tweaks a smooth and efficient process.

Prepare translations for the original English files with this handy built-in tool. For specific instructions on how to use this tool please refer to its dedicated article, you will find it here.

PL3 13 1.png

Logs

The 'Logs' page stores the history of actions performed by the module.

Use the action buttons to see details or delete each log entry. Multiple logs can be deleted at once by utilizing the mass selection function.

PL3 14.png
Furthermore, the logs feature additional actions. Changing the logs' settings, exporting the logs to a '.csv' file, and a way to delete specific log types.
PL3 15.png
In the settings you can specify which log types should be recorded, and whether they should be deleted automatically after a specific time.
PL3 16.png
While exporting you will pick a time frame and the log types to export.
PL3 17.png
Here you can decide which log types to delete, you can also specify how old the logs have to be to qualify for deletion. Leave the first field empty to delete all logs.
PL3 18.png

Client Area

When the client orders a product with a relation created for it, the relation will be displayed on the order form, provided the option is enabled in the addon's settings.

If included in the relations, promotions will be applied based on the settings.

PL3 19.png

Use Cases

This section provides scenarios that demonstrate common use cases, along with detailed explanations of how the module’s features can be utilized in real-world situations.

Review the following examples to understand better how the module can be applied in practice.

Basic Relation: Proxmox VE VPS and cPanel Manage2

In these steps, we will show you how to link Proxmox VE VPS with cPanel Manage2 through a product addon.
You can also link them using configurable options if you would prefer.

1. First create the product addon which will trigger the relation.
Go to 'System Settings' 'Products/Services' 'Products Addons' and press 'Add New Addon'.

PL3 21.png
2. Name your addon, there is no need to select a module since the addon will only be used to trigger the relation for the cPanel Manage2 Product to be added.
PL3 21 1.png
3. Make sure you check the 'Show on Order' checkbox under 'Details'.
PL3 21 2.png
4. It is advised to set up the same billing cycle as in the main product. The price of the addon will effectively be the price of the linked product.
PL3 21 3.png
5. Finally, select the main product which the addon will be available for, in this case, it is 'Proxmox VE VPS KVM'.

Next, press 'Save Changes'.

PL3 22.png
6. Now, create a relation at your 'Product Linker' 'Relations' 'Basic Relations'.
PL3 23.png
Configure the relation:
  • Type - select 'Addon' for this example.
  • Addon - select your newly created addon.
  • Swap Price - Leave this option disabled.
  • Linked Product - Select the product that will be added when the relation is triggered.
    It should be set to hidden and free. You have indirectly set its price at the product addon configuration.
  • Promotion - include a promotion, if you would like, you can add new promotions under 'System Settings' 'Payments' 'Promotions'.
  • Copy Custom Fields - Leave disabled unless you want to copy custom fields from the main product to the linked product.
PL3 24.png
To check if the relation works as it should, place an order from the admin area for the main product with the product addon triggering the relation.
PL3 25.png
The linked product will be added to the order along with the main product.
PL3 26.png

Product Relation: Proxmox VE VPS and Plesk Key Administrator

In these steps, we will show you how to link independent Proxmox VE VPS and Plesk Key Administrator products.
The linked product will always be added when the main product is ordered.
Create a relation at your 'Product Linker' 'Relations'. 'Product Relations'.
PL3 27.png
Configure the relation:
  • Main Product - select the main product which will trigger the relation on its own.
  • Linked Product - Select the product that will be added when the relation is triggered.
    It should be set to hidden and free. You can indirectly set its price by balancing the main product price and the promotion.
  • Promotion - include a promotion, if you would like, you can add new promotions under 'System Settings' 'Payments' 'Promotions'.
  • Copy Custom Fields - Leave disabled unless you want to copy custom fields from the main product to the linked product.
PL3 28.png
To check if the relation works as it should, place an order from the admin area for the main product with the product addon triggering the relation.
PL3 29.png
The linked product will be added to the order along with the main product.
PL3 30.png

Tips

1. If your client orders a product with settings triggering two relations with the same product, only one product will be created.
2. If your client orders a product configurable options upgrade/downgrade, the old linked product bound by a previous configurable option will stay active.
You need to remove the link between the old linked product and the main product in the addon and terminate the old linked product manually.
3. If a child product is at the same time a parent product in the other relation, changes made on its parent will be also commanded on its child.
4. Keep in mind that the second product, linked by the module, is never visible in the cart. It is automatically added once the first one is ordered.

Update Instructions

An 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.
Additionally, you will find a current list of supplementary actions necessary for a smooth update process there.

1. Data migration to version 2.0.0 is handled automatically upon module activation.
  • Download the latest version of the module from our client area.
  • Remove the old module's files from the WHMCS root directory.
    Note: The module folder name has been changed from 'productlinker' to 'ProductLinker'. Ensure that the old 'productlinker' folder is deleted completely.
  • Upload and extract the new files into your WHMCS root directory.
  • Activate the 'Product Linker' addon module.

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 Product Linker For WHMCS module to unlock these benefits.
Simply click on either the Get Source Code or Upgrade To Lifetime button found on the product's page in our client area to complete the one-step upgrade process, with a dedicated discount already applied.

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. We do not recommend using Product Linker For WHMCS with the following modules:
  • Product Free Trial Manager For WHMCS
  • Resellers Center For WHMCS

Integration between these modules is hampered due to specific features of each one of them and their individual workflow.
We are continually working on eliminating these limitations wherever possible.

Navigation
WHMCS Modules
WHMCS Widgets
Translations
cPanel Modules
General
FAQ
Community
Product Linker For WHMCS