DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:onlineordering

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:onlineordering [2011-09-29 14:58] jdtplugin:onlineordering [2019-01-13 16:06] (current) – Added bugtracker LarsDW223
Line 1: Line 1:
-====== onlineordering Plugin ======+====== OnlineOrdering Plugin ======
  
 ---- plugin ---- ---- plugin ----
-description: The OnlineOrdering Plugin allows you to create forms by which users can order items online.+description: The OnlineOrdering Plugin allows you to create forms by which users can order items online
 author     : Jannes Drost-Tenfelde author     : Jannes Drost-Tenfelde
 email      : info@drost-tenfelde.de email      : info@drost-tenfelde.de
 type       : Syntax type       : Syntax
 lastupdate : 2011-09-29 lastupdate : 2011-09-29
-compatible : 2011-05-25+compatible : 2011-05-25,2011-11-10
 depends    :  depends    : 
 conflicts  conflicts 
Line 13: Line 13:
 tags       : ordering, shop, forms tags       : ordering, shop, forms
  
-downloadurl: http://www.drost-tenfelde.de/lib/exe/fetch.php?media=dokuwiki:plugin_onlineordering_1_0.zip +downloadurl: https://github.com/jdtProjects/dokuwiki/raw/master/published/plugin_onlineordering_1_0.zip 
-bugtracker :  +bugtracker : https://github.com/jdtProjects/dokuwiki/issues 
-sourcerepo :  +sourcerepo : https://github.com/jdtProjects/dokuwiki/tree/master/onlineordering 
-donationurl: http://www.drost-tenfelde.de/?id=donate+donationurl: http://drost-tenfelde.de/donate 
 + 
 +screenshot_img: 
 ---- ----
  
Line 25: Line 27:
 ===== Installation ===== ===== Installation =====
  
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
 ===== How it works ===== ===== How it works =====
Line 39: Line 41:
 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. 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+  Total price = (nr of tickets * ticket price) + porto
  
-Where porto may differ for different countries. This can be setup using the [[#Syntax]] parameters.+Where ''porto'' may differ for different countries. This can be setup using the [[#syntax]] parameters.
  
 ==== Sending Order Form ==== ==== Sending Order Form ====
Line 61: Line 63:
 </code> </code>
  
-View the [[http://www.drost-tenfelde.de/?id=dokuwiki:plugins:onlineordering:demo#form|Online Demonstration]]+==== Demonstration ==== 
 + 
 +View the [[http://www.drost-tenfelde.de/doku.php/dokuwiki:plugins:onlineordering:demo|Online Demonstration]] FIXME
  
 ===== Syntax ===== ===== Syntax =====
  
-''%%{{onlineordering>%%key=value&..&key=value%%}}%%''+  {{onlineordering>%%key=value&..&key=value%%}}
  
-''//key//''    | the parameter key to set | required | +^ key    | the parameter key to set | required | 
-''//value//''  | the parameter value to set | required |+^ value  | the parameter value to set | required |
  
 You can set more than one element at once by using an ''&'' delimiter. You can set more than one element at once by using an ''&'' delimiter.
  
-Available parameters:+==== Available parameters ====
  
-^ Key  ^ Type  ^ Comments  ^ ^ +^ Key                 ^ Type  ^ Comments  ^ ^ 
-| item_name | string | Name of the item | **required** | +''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** | +''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** | +''currency''        | string | Currency of the item price | **required** | 
-| porto_default | number | Default porto cost | optional | +''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 | +''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_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 | +''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 | +''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 |+''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 ===== ===== Configuration and Settings =====
  
-^ Key  ^ Type  ^ Comments  ^ ^ +^ Key               ^ Type  ^ Comments  ^ ^ 
-| sender_name | string | Name that will be used for sending out orders via email. | optional | +''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** | +''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 | +''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** | +''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** | +''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 |+''signature''     | textarea | Signature that will be appended to the email. | optional |
  
 ==== Style.css ==== ==== Style.css ====
Line 99: Line 103:
 The stylesheet allows you to change the look and feel of error codes that are displayed to the user. The stylesheet allows you to change the look and feel of error codes that are displayed to the user.
  
-<code>+<code css>
 #onlineordering_plugin { #onlineordering_plugin {
     padding: 5px;     padding: 5px;
Line 119: Line 123:
 </code> </code>
  
-Where +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.
-<code>#onlinerordering_error</code> +
-is the div for the complete error message+
- +
-and +
-<code>#onlineordering_error #param</code> +
-allows you to manipulate the look and feel of the error parameter.+
  
 ===== E-mail templates ===== ===== E-mail templates =====
Line 132: Line 130:
  
 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. 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.
 +
 +<code>
 +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 />
 +</code>
  
 ==== Template fields ==== ==== Template fields ====
  
-^ Tag  ^ Comments  | +^ Tag                   ^ Comments   ^ 
-| %%{title}%% | Mr. or Ms. | +''%%{title}%%''       | Mr. or Ms. | 
-| %%{firstname}%% | The user's first name | +''%%{firstname}%%''   | The user's first name | 
-| %%{lastname}%% | The user's last name | +''%%{lastname}%%''    | The user's last name | 
-| %%{street}%% | The user's street number | +''%%{street}%%''      | The user's street number | 
-| %%{place}%% | The user's village or city | +''%%{place}%%''       | The user's village or city | 
-| %%{country}%% | The user's country | +''%%{country}%%''     | The user's country | 
-| %%{nr_tickets}%% | The number of tickets the user ordered | +''%%{nr_tickets}%%''  | The number of tickets the user ordered | 
-| %%{item_name}%% | The item name | +''%%{item_name}%%''   | The item name | 
-| %%{currency}%% | The currency | +''%%{currency}%%''    | The currency | 
-| %%{price}%% | The price per ticket | +''%%{price}%%''       | The price per ticket | 
-| %%{porto}%% | The porto | +''%%{porto}%%''       | The porto | 
-| %%{date}%% | The date the item was ordered | +''%%{date}%%''        | The date the item was ordered | 
-| %%{time}%% | The time the item was orderd | +''%%{time}%%''        | The time the item was orderd | 
-| %%{datetime}%% | The date and time the item was ordered | +''%%{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. | +''%%{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 |+''%%{total_price}%%'' | The calculated total price. Formula:<code>( nr of tickets * ticket price ) + porto</code> |
  
 ===== Files ===== ===== Files =====
Line 157: Line 196:
 Here is a list of the files currently used in the plugin. Here is a list of the files currently used in the plugin.
  
-^ Source Code  ^ +^ Source Code  ^
-| syntax.php | Contains the main plugin code | +''syntax.php'' | Contains the main plugin code | 
-| order_form.php | Contains the code for displaying the order form | +''order_form.php'' | Contains the code for displaying the order form | 
-| confirm_form.php | Contains the code for displaying the confirmation form | +''confirm_form.php'' | Contains the code for displaying the confirmation form | 
-| send_form.php | Contains the code for sending the order e-mails | +''send_form.php'' | Contains the code for sending the order e-mails | 
-^ Customizable +^ Customizable  ^
-| template_en.txt | Default (english) language email template, which will be sent to the user after confirming the order | +''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 | +''template_<lang>.txt'' | Optional alternate templates for different languages | 
-| style.css | Stylesheet for plugin specific layouts | +''style.css'' | Stylesheet for plugin specific layouts | 
-| images/ | Images for Stylesheet | +''images/'' | Images for Stylesheet | 
-^ Support +^ Support  ^
-| plugin.info.txt | Plugin information | +''plugin.info.txt'' | Plugin information | 
-^ Configuration +^ Configuration  ^
-| conf/metadata.php | Metadata settings | +''conf/metadata.php'' | Metadata settings | 
-| conf/default.php | Default settings | +''conf/default.php'' | Default settings | 
-^ Language +^ Language  ^
-| lang/en/lang.php | English language file | +''lang/en/lang.php'' | English language file |
  
 ===== Development ===== ===== Development =====
Line 180: Line 218:
 === Change Log === === Change Log ===
  
-  * **2011-09-29+  * **2011-09-29**
     * Initial release     * Initial release
  
Line 190: Line 228:
  
 ===== Discussion ===== ===== Discussion =====
 +
 +Where and how is the data saved?
 +
 +Thanks
plugin/onlineordering.1317301116.txt.gz · Last modified: 2011-09-29 14:58 by jdt

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