It's better when it's simple

User Tools

Site Tools


OnlineOrdering Plugin

Compatible with DokuWiki


plugin The OnlineOrdering Plugin allows you to create forms by which users can order items online

Last updated on

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to eshop

Tagged with forms, ordering, shop

This plugin allows you to create forms by which users can order items online. After successfully filling out the forms, the user will receive an e-mail with the order and the necessary payment information.

The handling of payments and shipping of items has to be done manually.


Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

How it works

There are three steps the user must take before an order is completed.

Order Form

The first step is filling out the order form, where the user must fill out the fields. Each field is validated. If a field is incorrect or a required field is empty, the user will be presented with the appropriate error messages.

Confirmation Form

When all fields are valid, the user will be presented a summary of all the data he/she has entered. In addition, the price for the ordered tickets is calculated.

Total price = (nr of tickets * ticket price) + porto

Where porto may differ for different countries. This can be setup using the syntax parameters.

Sending Order Form

Once the user has confirmed the entered data, he/she will be forwarded to the sending order form, where an e-mail will be prepared and sent to the user.

The e-mail can be customised and typically contains the order information, along with the information entered by the user in the order form.


item_name=My Personal CD
&porto_The Netherlands=0,5



key the parameter key to set required
value the parameter value to set required

You can set more than one element at once by using an & delimiter.

Available parameters

Key Type Comments
item_name string Name of the item required
abbreviation string The abbreviation will be used for generation of a unique order key, by which the exact order can be identified required
currency string Currency of the item price required
porto_default number Default porto cost optional
porto_<country> number Porto for a specific country. Example: porto_The Netherlands will allow you to set the porto for The Netherlands. If no porto has been set for the specific country, porto_default will be used. Available countries can be set in the plugin's configuration parameters. optional
sender_name String Name of the service that sends the e-mail. If this parameteris not set, the value of the configuration parameter sender_name will be used. optional
sender_email email E-mail address of the service that sends the e-mail. If this parameter is not set, the value of the configuration parameter sender_email will be used. optional
email_cc string E-mail addresses, seperated by commas, to which a copy of the sent e-mail is sent. If the parameter is not set, the value of the configuration parameter email_cc will be used. optional
countries string List of countries, seperated by commas. If this parameter is not set, the configuration parameter countries will be used. optional

Configuration and Settings

Key Type Comments
sender_name string Name that will be used for sending out orders via email. optional
sender email email E-mail address that will be used for sending out orders (Typically, this is a noreply address) required
email_cc email E-mail addresses (comma seperated) to which a blind copy of the order will be sent via e-mail. (Typically, this holds the address of the person handling the transactions) optional
bank_account textarea The bank details where the user can make payments for the ordered items required
countries string Comma seperated list of countries. Example: Germany,The Netherlands,Great Britain required
signature textarea Signature that will be appended to the email. optional


The stylesheet allows you to change the look and feel of error codes that are displayed to the user.

#onlineordering_plugin {
    padding: 5px;
#onlineordering_error {
    color: #000000;
    clear: both;
    padding-left: 20px;
    padding-right: 20px;
    border-bottom: 1px solid #FF9999;
    background: #FFAAAA url('images/error.gif') no-repeat;
#onlineordering_error #parameter {
    color: #FF0000;
    font-weight: bold;

Where #onlinerordering_error is the div for the complete error message and #onlineordering_error #param allows you to manipulate the look and feel of the error parameter.

E-mail templates

The email template is a text file template_<lang>.txt that will be used for sending out the e-mail to the user. The default file template_en.txt will be used if no language specific template can be found.

In the template file, a complete e-mail can be prepared for the user, using several special fields that will be automatically filled in by the plugin.

Dear {title} {firstname} {lastname},<br />
<br />
thank you for ordering {item_name} at {datetime}!<br />
<br />
Provided data:<br />
<br />
Title: {title}<br />
First name: {firstname}<br />
Last name: {lastname}<br />
Street + nr: {street}<br />
Postcode: {postcode}<br />
Place: {place}<br />
Country: {country}<br />
Remarks: {remarks}<br />
<br />
Price information:<br />
--------------------------------------------------<br />
Ticket price: {price} {currency}<br />
Number of tickets: {nr_tickets}<br />
Porto: {porto} {currency}<br />
--------------------------------------------------<br />
Total price: {total_price} {currency}<br />
--------------------------------------------------<br />
<br />
Please transfer {total_price} {currency} to the following bank account:<br />
<br />
{bank_account}<br />
<br />
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br />
Please do not forget to include the
following transaction comment <br />
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br />
Ticket Number: {ticket}<br />
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br /> 
<br />
Your order will be sent as soon as the transaction has been successfully completed.<br />
<br />
{signature}<br />

Template fields

Tag Comments
{title} Mr. or Ms.
{firstname} The user's first name
{lastname} The user's last name
{street} The user's street & number
{place} The user's village or city
{country} The user's country
{nr_tickets} The number of tickets the user ordered
{item_name} The item name
{currency} The currency
{price} The price per ticket
{porto} The porto
{date} The date the item was ordered
{time} The time the item was orderd
{datetime} The date and time the item was ordered
{ticket} The automatically generated ticket identifier. This identifier consists of the provided abbreviation (see syntax) along with a 5 digit random number.
{total_price} The calculated total price. Formula:
( nr of tickets * ticket price ) + porto


Here is a list of the files currently used in the plugin.

Source Code
syntax.php Contains the main plugin code
order_form.php Contains the code for displaying the order form
confirm_form.php Contains the code for displaying the confirmation form
send_form.php Contains the code for sending the order e-mails
template_en.txt Default (english) language email template, which will be sent to the user after confirming the order
template_<lang>.txt Optional alternate templates for different languages
style.css Stylesheet for plugin specific layouts
images/ Images for Stylesheet
Support Plugin information
conf/metadata.php Metadata settings
conf/default.php Default settings
lang/en/lang.php English language file


Change Log

  • 2011-09-29
    • Initial release

Known Bugs and Issues

ToDo/Wish List



Where and how is the data saved?


plugin/onlineordering.txt · Last modified: 2019-01-13 16:06 by LarsDW223

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki