Installing Order Approval Rules¶
Upload the files¶
The extension must end up in this folder of your Paymenter installation. The folder name must be exactly OrderApprovalRules.
extensions/Others/OrderApprovalRules/
You can get it there in two ways.
Upload the ZIP in the admin area
- In the admin area, open Extensions, then Available Extensions.
- Switch to the Ready to Install / Upload tab.
- Click Upload Extension, choose the ZIP file and confirm.
Copy the folder by hand
- Unpack the ZIP and copy the
OrderApprovalRulesfolder toextensions/Others/OrderApprovalRules/. -
If the extension does not show up in the next step, run these commands in the Paymenter root directory:
composer dump-autoload php artisan optimize:clear
Install and enable¶
- Open Extensions, then Available Extensions, tab Ready to Install / Upload.
- Find Order Approval Rules (Jube Hosting) in the list and click Install. Paymenter opens the extension's settings page.
- Switch on Enabled and save.
Installing and enabling both run the extension's migrations, which create two tables:
| Table | Content |
|---|---|
ext_order_approval_rules |
Your rules |
ext_order_reviews |
One review per flagged order, with its status and the names of the rules that matched |
Once the extension is enabled:
- the Extensions navigation group of the admin area has two new entries, Order Approval Rules and Pending Reviews,
- every new order is checked against your enabled rules,
- services of orders with a pending review are held back when their invoice is paid.
First-time setup¶
The extension has no settings and ships without rules. Until you create a rule, no order is flagged and nothing changes for your customers.
- Open Order Approval Rules in the Extensions navigation group.
- Click New approval rule and fill in the form. The fields are described in Configuration.
- Place a test order that matches the rule and check that it appears under Pending Reviews.
Rules apply to orders created after the rule exists. Existing orders are not checked again.
Updating¶
- Upload the new ZIP with Upload Extension as described above. Paymenter replaces the
extensions/Others/OrderApprovalRulesfolder and calls the extension's upgrade step, which runs any new migrations. - If you replace the folder by hand instead, disable and re-enable the extension afterwards. Enabling runs any new migrations.
Existing rules and reviews are kept.
Uninstalling¶
- Approve or otherwise settle every review that is still pending. See the warning below.
- Open the extension's settings page in the admin area.
- Click Uninstall Extension and confirm.
Warning
Uninstalling drops the ext_order_approval_rules and ext_order_reviews tables. All rules and the whole review history are deleted. Orders, services and invoices are not changed.
Warning
A service whose invoice was paid while its order was on hold stays pending. Paymenter has already processed that invoice and will not do it again. If you disable or uninstall the extension before approving such an order, nothing provisions the service; you have to activate it yourself.
Disabling the extension keeps both tables. While it is disabled, no order is checked, pending reviews no longer hold anything back, and the two admin pages are not available.