• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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