...
Excerpt |
---|
|
Order System is a plugin that allows the creation of public facing order forms, providing a method for clients to purchase new services. |
Table of Contents |
---|
Table of Contents |
---|
maxLevel | 6 |
---|
minLevel | 2 |
---|
outline | true |
---|
class | toc |
---|
|
|
Info |
---|
The Order System is installed by default, but may need to be installed for addon companies. |
...
- Status – This is the status of this order form, Active to enable the order form or Inactive to disable it.
- Name – The name of this order form, this will appear in the heading on front facing pages for this order form.
- Label – The label helps make up the URL to this order form, which is displayed next to the field, and must be unique.
- Visibility – The visibility controls whether the order form appears on the order forms listing page and whether it's packages may be ordered.
- Public – The order form is always visible and orderable for everyone
- Shared – The order form is not visible on the order form listing page, but may be orderable for everyone, such as via a direct link to the order form
- Client Only – The order form is not visible on the order form listing page and may only be orderable by clients that are currently logged in
- Type – This is the type of order form, currently the following three are available: Domain and Other, General, and Client Registration. In most cases, the General type is preferred. This selection will determine what options are displayed for the Template.
- Template – Select an order form template. The template controls the look and flow of the order form. Wizard boxes is the default template, and is most widely used.
...
The "order_page" tag contains the controller and action that references a specific page, which may include any one of the following:
{{order_page}} value | Notes |
---|
signup/index | The new account registration page |
main/index | The package selection page |
main/packages | A specific package selection page |
forms/index | The order form listing page |
config/index | A specific package configuration page |
config/preconfig | A specific package pre-configuration page |
checkout/index | The payment page |
checkout/complete | The completed order page |
cart/index | The cart page |
For example, the following embed code will display a message at the bottom of the registration page. You can use the {% debug %} tag to display all data available to aid in determining which variables you want to use, but this tag should not be used in production. Note that the data available will change depending on what stage in the order process you are.
...
The order received email templates allow for the following tags:
Tags | Description | Notes |
---|
{order.id} | The system-level order ID | |
{order.number} | The order number | e.g. "519131eb623b8" |
{order.client_id} | The system-level client ID of the client this order belongs to | |
{order.client_id_code} | The friendly client ID code | |
{order.client_first_name} | The first name of the client | |
{order.client_last_name} | The last name of the client | |
{order.client_company} | The client's company name | |
{order.client_address1} | The client's primary address | |
{order.client_email} | The client's email address | |
{invoice.id} | The system-level invoice ID of the invoice created for this order | |
{invoice.id_code} | The friendly invoice ID code | |
{invoice.date_due} | The UTC datetime stamp of the invoice due date | Formatted as "YYYY-MM-DD HH:MM:SS" |
{invoice.date_billed} | The UTC datetime stamp of the invoice bill date | Formatted as "YYYY-MM-DD HH:MM:SS" |
{invoice.total} | The total amount due on the invoice | e.g. "8.00" |
{invoice.paid} | The total amount paid | e.g. "0.00" |
{invoice.due} | The remaining amount due | e.g. "8.00" |
{invoice.currency} | The currency that the invoice is in | e.g. "USD" |
Expand |
---|
|
Due to the nature of tag objects containing several fields, many of which are likely irrelevant for use in email templates, but may be useful to you in certain circumstances, a dump of the tags are shown below. Code Block |
---|
title | The {order} object |
---|
collapse | true |
---|
| stdClass Object
(
[id] => 52
[order_number] => 519131eb623b8
[order_form_id] => 1
[invoice_id] => 19983
[fraud_report] =>
[status] => pending
[date_added] => 2013-05-13 18:33:15
[fraud_status] =>
[order_form_label] => my_order_form
[order_form_name] => My Order Form
[client_id] => 3
[total] => 8.0000
[paid] => 0.0000
[currency] => USD
[date_closed] =>
[invoice_id_code] => PD-15695
[client_id_code] => PD-1501
[client_first_name] => Mark
[client_last_name] => Stevens
[client_company] => Comp Co.
[client_address1] => 123 Test St.
[client_email] => user@domain.com
[services] => Array
(
[0] => stdClass Object
(
[order_id] => 52
[service_id] => 234
)
)
) |
Code Block |
---|
title | The {invoice} object |
---|
collapse | true |
---|
| stdClass Object
(
[id] => 19983
[id_format] => PD-{num}
[id_value] => 15695
[client_id] => 3
[date_billed] => 2013-05-13 18:33:15
[date_due] => 2013-05-13 18:33:15
[date_closed] =>
[date_autodebit] =>
[status] => active
[subtotal] => 8.0000
[total] => 8.0000
[paid] => 0.0000
[previous_due] => 2635.4700
[currency] => USD
[note_public] =>
[note_private] =>
[id_code] => PD-15695
[delivery_date_sent] =>
[due] => 8.0000
[line_items] => Array
(
[0] => stdClass Object
(
[id] => 54940
[invoice_id] => 19983
[service_id] => 234
[description] => Bronze Standard - domain.com
[qty] => 1.0000
[amount] => 8.0000
[subtotal] => 8.00000000
[taxes] => Array
(
)
[taxes_applied] => Array
(
)
[tax_subtotal] => 0
[tax_total] => 0
[total] => 8
[total_w_tax] => 8
)
)
[delivery] => Array
(
[0] => stdClass Object
(
[id] => 20716
[invoice_id] => 19983
[method] => email
[date_sent] =>
)
)
[meta] => Array
(
)
[tax_subtotal] => 0
[tax_total] => 0
[taxes] => Array
(
)
) |
Code Block |
---|
title | The {services} array of objects |
---|
collapse | true |
---|
| Array
(
[0] => stdClass Object
(
[id] => 234
[parent_service_id] =>
[package_group_id] => 1
[id_format] => PD-{num}
[id_value] => 229
[pricing_id] => 22
[client_id] => 3
[module_row_id] => 6
[coupon_id] =>
[qty] => 1
[status] => in_review
[date_added] => 2013-05-13 18:33:14
[date_renews] => 2013-06-13 18:33:14
[date_last_renewed] =>
[date_suspended] =>
[date_canceled] =>
[id_code] => PD-229
[fields] => Array
(
[0] => stdClass Object
(
[key] => cpanel_confirm_password
[value] => password
[serialized] => 0
[encrypted] => 1
)
[1] => stdClass Object
(
[key] => cpanel_domain
[value] => domain.com
[serialized] => 0
[encrypted] => 0
)
[2] => stdClass Object
(
[key] => cpanel_password
[value] => password
[serialized] => 0
[encrypted] => 1
)
[3] => stdClass Object
(
[key] => cpanel_username
[value] => domainco
[serialized] => 0
[encrypted] => 0
)
)
[package_pricing] => stdClass Object
(
[id] => 22
[package_id] => 13
[term] => 1
[period] => month
[price] => 8.0000
[setup_fee] => 0.0000
[cancel_fee] => 0.0000
[currency] => USD
)
[package] => stdClass Object
(
[id] => 13
[id_format] => {num}
[id_value] => 1
[module_id] => 4
[name] => Bronze Standard
[description] =>
[description_html] => <p>
<span style="color:#008000;"><em>Good Value!</em></span></p>
[qty] =>
[module_row] => 6
[module_group] =>
[taxable] => 0
[status] => active
[company_id] => 1
)
[name] => domain.com
[coupon] => stdClass Object
(
[id] => 2
[code] => knW3Lesn
[company_id] => 1
[used_qty] => 16
[max_qty] => 0
[start_date] => 2017-02-02 08:00:00
[end_date] => 2018-02-03 07:59:59
[status] => active
[recurring] => 0
[limit_recurring] => 0
[apply_package_options] => 1
[internal_use_only] => 0
[type] => exclusive
[amounts] => Array
(
[0] => stdClass Object
(
[coupon_id] => 2
[currency] => USD
[amount] => 5.0000
[type] => amount
)
)
[packages] => Array
(
[0] => stdClass Object
(
[coupon_id] => 2
[package_id] => 80
)
)
)
)
)
)
) |
|
...
The ticket received email template allows for the following tags:
Tags | Description | Notes |
---|
{order.id} | The system-level order ID | |
{order.number} | The order number | e.g. "519131eb623b8" |
{order.client_id} | The system-level client ID of the client this order belongs to | |
{order.client_id_code} | The friendly client ID code | |
{order.client_first_name} | The first name of the client | |
{order.client_last_name} | The last name of the client | |
{order.client_company} | The client's company name | |
{order.client_address1} | The client's primary address | |
{order.client_email} | The client's email address | |
{invoice.id} | The system-level invoice ID of the invoice created for this order | |
{invoice.id_code} | The friendly invoice ID code | |
{invoice.date_due} | The UTC datetime stamp of the invoice due date | Formatted as "YYYY-MM-DD HH:MM:SS" |
{invoice.date_billed} | The UTC datetime stamp of the invoice bill date | Formatted as "YYYY-MM-DD HH:MM:SS" |
{invoice.total} | The total amount due on the invoice | e.g. "8.00" |
{invoice.paid} | The total amount paid | e.g. "0.00" |
{invoice.due} | The remaining amount due | e.g. "8.00" |
{invoice.currency} | The currency that the invoice is in | e.g. "USD" |
Expand |
---|
|
Due to the nature of tag objects containing several fields, many of which are likely irrelevant for use in email templates, but may be useful to you in certain circumstances, a dump of the tags are shown below. Code Block |
---|
title | The {order} object |
---|
collapse | true |
---|
| stdClass Object
(
[id] => 52
[order_number] => 519131eb623b8
[order_form_id] => 1
[invoice_id] => 19983
[fraud_report] =>
[status] => pending
[date_added] => 2013-05-13 18:33:15
[fraud_status] =>
[order_form_label] => my_order_form
[order_form_name] => My Order Form
[client_id] => 3
[total] => 8.0000
[paid] => 0.0000
[currency] => USD
[date_closed] =>
[invoice_id_code] => PD-15695
[client_id_code] => PD-1501
[client_first_name] => Mark
[client_last_name] => Stevens
[client_company] => Comp Co.
[client_address1] => 123 Test St.
[client_email] => user@domain.com
[services] => Array
(
[0] => stdClass Object
(
[order_id] => 52
[service_id] => 234
)
)
) |
Code Block |
---|
title | The {invoice} object |
---|
collapse | true |
---|
| stdClass Object
(
[id] => 19983
[id_format] => PD-{num}
[id_value] => 15695
[client_id] => 3
[date_billed] => 2013-05-13 18:33:15
[date_due] => 2013-05-13 18:33:15
[date_closed] =>
[date_autodebit] =>
[status] => active
[subtotal] => 8.0000
[total] => 8.0000
[paid] => 0.0000
[previous_due] => 2635.4700
[currency] => USD
[note_public] =>
[note_private] =>
[id_code] => PD-15695
[delivery_date_sent] =>
[due] => 8.0000
[line_items] => Array
(
[0] => stdClass Object
(
[id] => 54940
[invoice_id] => 19983
[service_id] => 234
[description] => Bronze Standard - domain.com
[qty] => 1.0000
[amount] => 8.0000
[subtotal] => 8.00000000
[taxes] => Array
(
)
[taxes_applied] => Array
(
)
[tax_subtotal] => 0
[tax_total] => 0
[total] => 8
[total_w_tax] => 8
)
)
[delivery] => Array
(
[0] => stdClass Object
(
[id] => 20716
[invoice_id] => 19983
[method] => email
[date_sent] =>
)
)
[meta] => Array
(
)
[tax_subtotal] => 0
[tax_total] => 0
[taxes] => Array
(
)
) |
Code Block |
---|
title | The {services} array of objects |
---|
collapse | true |
---|
| Array
(
[0] => stdClass Object
(
[id] => 234
[parent_service_id] =>
[package_group_id] => 1
[id_format] => PD-{num}
[id_value] => 229
[pricing_id] => 22
[client_id] => 3
[module_row_id] => 6
[coupon_id] =>
[qty] => 1
[status] => in_review
[date_added] => 2013-05-13 18:33:14
[date_renews] => 2013-06-13 18:33:14
[date_last_renewed] =>
[date_suspended] =>
[date_canceled] =>
[id_code] => PD-229
[fields] => Array
(
[0] => stdClass Object
(
[key] => cpanel_confirm_password
[value] => password
[serialized] => 0
[encrypted] => 1
)
[1] => stdClass Object
(
[key] => cpanel_domain
[value] => domain.com
[serialized] => 0
[encrypted] => 0
)
[2] => stdClass Object
(
[key] => cpanel_password
[value] => password
[serialized] => 0
[encrypted] => 1
)
[3] => stdClass Object
(
[key] => cpanel_username
[value] => domainco
[serialized] => 0
[encrypted] => 0
)
)
[package_pricing] => stdClass Object
(
[id] => 22
[package_id] => 13
[term] => 1
[period] => month
[price] => 8.0000
[setup_fee] => 0.0000
[cancel_fee] => 0.0000
[currency] => USD
)
[package] => stdClass Object
(
[id] => 13
[id_format] => {num}
[id_value] => 1
[module_id] => 4
[name] => Bronze Standard
[description] =>
[description_html] => <p>
<span style="color:#008000;"><em>Good Value!</em></span></p>
[qty] =>
[module_row] => 6
[module_group] =>
[taxable] => 0
[status] => active
[company_id] => 1
)
[name] => domain.com
[coupon] => stdClass Object
(
[id] => 2
[code] => knW3Lesn
[company_id] => 1
[used_qty] => 16
[max_qty] => 0
[start_date] => 2017-02-02 08:00:00
[end_date] => 2018-02-03 07:59:59
[status] => active
[recurring] => 0
[limit_recurring] => 0
[apply_package_options] => 1
[internal_use_only] => 0
[type] => exclusive
[amounts] => Array
(
[0] => stdClass Object
(
[coupon_id] => 2
[currency] => USD
[amount] => 5.0000
[type] => amount
)
)
[packages] => Array
(
[0] => stdClass Object
(
[coupon_id] => 2
[package_id] => 80
)
)
)
)
)
)
) |
|
...
The default order form exists at /order/, relative to your installation path. Other order forms may be accessed through their unique label identifier. Below are a few examples:
Name | Label | URI | Default Order Form |
---|
Web Design | design | /order/ or /order/main/index/design | |
VPS Servers | vps | /order/main/index/vps | |
Domain Registration | domains | /order/main/index/domains | |
Linking to a Specific Product
The following examples demonstrate how to link to a particular product or price point.
Description | Parameters | URI |
---|
Display Package Group | - group_id The ID of the package group to display.
| /order/main/packages/label/?group_id=1 |
Display Package Group with Package Selected | | /order/main/packages/label/?group_id=1&package_id=2 |
Display Package Configuration with Price Selected | |
Order Template | URI |
---|
AJAX Boxes AJAX Slider AJAX List | /order/main/packages/label/?group_id=1&pricing_id=5 | Wizard Boxes Wizard Slider Wizard List Standard | /order/config/index/label/?group_id=1&pricing_id=5 |
|
Linking to an Order Form to Include a Coupon
...
Note |
---|
When including a coupon code in a URL, the coupon code must be URL encoded. |
Description | Parameters | URI | Notes |
---|
Set a Coupon to an Order Form | - coupon The coupon code to apply to the order
| /order/main/index/label/?coupon=CPN123 | In this example, the
- Coupon code is CPN123
- Order form label is label
|
Set a Coupon to a Specific Product | | /order/main/index/vps/?group_id=1&package_id=5&coupon=10off | In this example, the - Coupon code is 10off
- Order form label is vps
- Package Group ID is 1
- Package ID is 5
|
Common Issues
- reCaptcha always returns "The captcha entered was invalid. Please try again."
- This may be a result of allow_url_fopen being disabled in your PHP config. To confirm, check your Blesta logs for: general.WARNING: E_WARNING: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 This directive must be changed for reCaptcha to work properly.