Skip to content

Using Purchase Requirements

Admin: manage requirements

Open Purchase Requirements in the Extensions navigation group.

The list has these columns:

Column Content
Product The product the requirement applies to. Searchable and sortable.
Condition What the requirement does, for example Requires an active "VPS" service or Maximum 3 per customer.
Enabled Whether the requirement is active.
Updated When it was last changed. You can hide this column.

The newest requirement is at the top. Each row has an edit and a delete action. The edit page also has a delete button.

Make a product depend on another product

Example: the add-on Dedicated IPv4 may only be bought by customers with an active VPS.

  1. Open Purchase Requirements and start a new requirement.
  2. In Product, choose Dedicated IPv4.
  3. Leave Requirement type on Requires an active service of another product.
  4. In Required product, choose VPS.
  5. Optionally enter a Custom error message.
  6. Leave Enabled on and save.

A customer without an active VPS service now gets the message You need an active VPS service before purchasing Dedicated IPv4. As soon as the customer has an active VPS service, the product can be bought.

Limit how often a customer can hold a product

Example: a free trial, one per customer.

  1. Start a new requirement and choose the trial product in Product.
  2. Set Requirement type to Maximum quantity per customer.
  3. Enter 1 in Maximum quantity per customer.
  4. Save.

A customer who already has a pending, active or suspended service of that product gets the message You can purchase at most 1 <product> per customer. After the service is cancelled, the customer can order again.

Switch a requirement off

Edit the requirement, switch off Enabled and save. The requirement stays in the list and stops blocking purchases at once. Deleting a requirement has the same effect on purchases and removes the row.

What the customer sees

The extension adds no pages and changes nothing in the shop's appearance. Products with requirements are still listed and can be opened. A customer only notices a requirement when it blocks them:

  • Adding to the cart. When a signed-in customer adds a product they are not allowed to buy, the product is not added and a Paymenter error notification shows the message.
  • Checkout. When the customer places the order and a product in the cart does not meet its requirements, no order is created and the same kind of notification shows the message. The cart stays as it is, so the customer can remove the product and try again.

Only one message is shown at a time: the first requirement that is not met.

When the checks run

Moment Who is checked What is counted
A product is added to the cart as a new cart line Signed-in customers only The customer's services plus the quantity of the line being added
The order is created at checkout The customer placing the order The customer's services plus the summed quantity of all cart lines of the same product

Details that follow from this:

  • Guests can fill a cart. A visitor who is not signed in can add any product. Paymenter requires a login at checkout, and the order check then applies the requirements.
  • Changes inside the cart are checked at checkout. Changing the quantity of a cart line or editing an existing line does not run the cart check. The order check catches it.
  • Several lines of one product. The cart check looks only at the line being added. A customer can therefore put more lines of a limited product into the cart than the limit allows. The order check adds the lines up and blocks the order.
  • Carts filled earlier. A cart that was filled before you created a requirement is checked when the order is created.

Automatic behaviour

The extension has no scheduled tasks and sends no e-mails. It does not look at services after they were bought: a service that a customer already holds is never suspended, cancelled or changed because of a requirement, including when the required service is cancelled later.