• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Expanding limits via Plesk SDK

D

dotgray

Guest
We've recently installed Plesk/Win and configured ModernBill 4.4 to set up accounts via its module interface to the Plesk SDK. This works fine for new accounts, where the account type has fixed characteristics (e.g. a hosting package with X MB of disk space, Y GB of transfer, etc).

However, as is typical with web hosting, we want to offer a la carte expansion of the base packages for clients who need more disk space, mailboxes, etc. ModernBill supports these via "add-ons", and ordering them is supported well enough through their order form process. However, each add-on requires a Plesk attribute in order to have any effect on actual hosting limits. I've gone through the Plesk SDK documentation and ModernBill's examples on using their Plesk module, and neither explain how to modify an existing limit.

For example: a customer orders a base hosting package with 200MB of disk space. They select an add-on for an additional 100MB of disk space for a set monthly fee. ModernBill will happily now charge them for 300MB of storage, but when the domain is set up on via the SDK, domain_pref.exe only has one value for "disk_space", which represents the maximum.

In this case, how do you set up the Plesk SDK to modify a limit so that it will *add* 100MB to the disk_space quota, rather than setting the new maximum limit to 100MB? The same problem also applies to max_traffic, max_box, and other limits those are often sold on a per unit basis.
 
You should use two scripts. First query will get the current value of some parameter. Second script will encreaze this value and then will set up in to Plesk. Hope that helps a bit.
 
Back
Top