Skip to main content

Custom disk sizes

Coming Soon

Custom disk sizes will be available when version two of the module is released.

Added in v2

In version 2 of this module, a configurable option for custom disk size was added.

If you are upgrading from v1 and wish to add this option to your existing installation, check "Re-sync configurable options on save" in the 'Other' tab of Edit Product.

The custom disk sizes configurable option provides the means for a customer to order a VM with a system disk that is greater than the default provided in the chosen disk template.

Use the default disk size

If left as zero, the default disk space specified by the disk template will be provisioned.

Use the custom disk size

When a customer provides a non-zero amount for the configurable option, the system disk for the VM will have its size set to this amount.

Note that its minimum size is that of the corresponding disk template. Its maximum size is that of the smallest value of the global maximum disk size and the organization's maximum disk size.

Validation

The size will be validated for a minimum size compatible with the chosen disk template.

For example, if you're using a Rocky Linux template which has a minimum system disk size of 50GB, the user will need to select a minimum of 50.

Shopping cart validation

A customer has not configured sufficient storage for the chosen disk template in this example.

A screenshot of the shopping cart showing a validation error for insufficient custom disk size.

Setting pricing

You can set the price per GB in the Configurable Options for "Custom Disk Size (GB)".

Opt out of using custom disk sizes

If you do not wish to use this option, mark it as hidden and leave the pricing as 0.

UX options

To display the UX as a slider instead of numeric input, set a maximum value for the configurable option.

If you're only using disk templates which all have a minimum of 50GB, you can set the minimum value for the configurable option to 50, and the user will avoid running into any validation errors.

Custom Disk Sizes

price-per-gb cannot be changed. Price per GB after the | is the friendly display name shown to your customers, and may be customised.

For a Quantity option type, configure the "one time" pricing. Here we show an example of £0.15 per GB.

A screenshot of the custom disk sizes configurable option.

Using predefined options instead of a quantity selector

You can opt to give customers a predefined selection of disk sizes, as shown.

Here, the default of 50GB carries a £0 value and is the default for the product's base price of £15.

Dropdown menu for Custom Disk Size

A screenshot of the custom disk sizes configurable option with the drowndown type.

How this appears in the shopping cart

Here, the customer has chosen not to change the default 50 GB disk and so will be charged £15.

A screenshot of the custom disk size dropdown type in the shopping cart, 50 GB selected.

Here, the customer has chosen to increase the disk to 250 GB and so will be charged £20.

A screenshot of the custom disk size dropdown type in the shopping cart, 250 GB selected.