Purchase Requirements FAQ¶
Questions¶
Does a pending or suspended service fulfil a required product rule?¶
No. Only a service with the status active counts. A customer who ordered the required product but has not paid yet, or whose service is suspended, is blocked.
Can a customer buy the required product and the add-on in one order?¶
No. The required product must already be an active service when the add-on is added to the cart. A product that is only in the cart does not count.
What happens to an add-on when the required service is cancelled later?¶
Nothing. Requirements are only checked at purchase. Existing services are not touched.
Can a product require several other products?¶
Yes. Create one requirement per required product. The customer must meet all of them. There is no "one of these products" rule.
Can I combine a required product and a maximum quantity on the same product?¶
Yes. Create two requirements for the product. Both must be met.
How does this relate to Paymenter's own per-user limit?¶
Paymenter's product field per_user_limit is separate and still works. At checkout Paymenter checks its own limit first, then this extension checks its requirements. The order goes through only if both allow it. Paymenter's limit counts every service of the customer including cancelled ones, while this extension ignores cancelled services.
Are requirements hidden products? Can the customer see the product?¶
The product stays visible in the shop. The extension only blocks adding it to the cart and placing the order.
Can I use placeholders in the custom error message?¶
No. The text is shown exactly as entered.
Are orders that an administrator creates checked?¶
The order check reads the shop cart of the current browser session. An order created in the admin area or through the API normally has no such cart, so nothing is checked. Services you add by hand are not checked either.
Do requirements apply to upgrades or renewals?¶
No. The extension only listens to new cart lines and new orders.
Does the extension send e-mails or run on a schedule?¶
No.
Troubleshooting¶
The extension does not appear under Ready to Install / Upload¶
Check that the folder is extensions/Others/PurchaseRequirements/ with exactly that name, then run in the Paymenter root directory:
composer dump-autoload
php artisan optimize:clear
The Purchase Requirements menu entry is missing¶
The entry only exists while the extension is installed and enabled. Open the extension's settings page and check that Enabled is switched on.
A customer is blocked although they own the required product¶
Check the status of that service. It must be active. Pending, suspended and cancelled services do not count. Also check that the service belongs to the same customer account and to exactly the product selected in Required product.
A customer is blocked by a quantity limit although they have fewer active services¶
Pending and suspended services count towards the limit. An unpaid order of the same product occupies a slot until its service is cancelled. Quantities already in the cart count as well.
A customer could add more to the cart than the limit allows¶
That is expected. Adding to the cart checks only the line being added, and quantity changes inside the cart are not checked at that moment. The order check at checkout adds everything up and blocks the order.
A requirement does not block anything¶
Check these points:
- Enabled is on for the requirement, and the extension itself is enabled.
- Product is the product the customer is buying, not the required one.
- The Condition column does not read
Requires an active service (no product selected). That means the required product was deleted, and such a requirement lets everyone through. - The customer was signed in. Guests are only checked at checkout.
A product cannot be bought by anyone¶
Look for a requirement whose Required product is the same as its Product. The form does not prevent this, and such a product can only be bought by customers who already have it.
"Base table or view not found: ext_purchase_requirements"¶
The migration did not run. Disable and re-enable the extension in the admin area, or run in the Paymenter root directory:
php artisan migrate --path=extensions/Others/PurchaseRequirements/database/migrations --force