Skip to content
This repository has been archived by the owner on Jun 13, 2020. It is now read-only.

Commit

Permalink
Merge pull request #2 from richardhj/feature/v0.10.0
Browse files Browse the repository at this point in the history
Feature/v0.10.0
  • Loading branch information
Richard Henkenjohann authored Oct 24, 2017
2 parents 13e5c27 + 315f848 commit 74219d8
Show file tree
Hide file tree
Showing 42 changed files with 1,200 additions and 664 deletions.
92 changes: 72 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,44 @@ Online tickets extension for Isotope eCommerce
==============================================
*Sell online tickets with Isotope eCommerce*

**This extension requires a high amount of Contao/Isotope know-how and a basic understanding of your home network and routing domains/ip addresses.**
**This extension requires a high amount of Contao/Isotope know-how and a basic understanding of your home network and
routing domains/ip addresses.**

What it does
============
------------

### Before the event

You can sell online tickets for your events. After successful order, these online tickets get a QR-code and are home printable for the customer.
You can sell online tickets for your events. After successful order, these online tickets get a QR-code/Barcode and are
home printable for the customer.

If you sell hardtickets and want to track sales, this extension provides tool to print your hardtickets with cusotmized barcodes.
If you sell hard tickets and want to track sales, this extension provides tool to print your hard tickets with a
customized barcode.


### During the event

#### Check in

Check in all sold tickets (hardtickets or online tickets) and track venue's degree of capacity.
Check in all sold tickets (hard tickets or online tickets) and track venue's degree of capacity.

The included api is fully compatible with the ones of [TicketPay](http://ticketpay.de/). Install the iOS native [mobile app](http://ticketpay.de/app-demo/) to perform the checkin.
The included api is fully compatible with the ones of [TicketPay](http://ticketpay.de/). Install the iOS native
[mobile app](http://ticketpay.de/app-demo/) to perform the checkin.

![app](http://ticketpay.de/wp-content/uploads/2013/09/app1.png)

#### Management board / Box office

There is a management board included. Place the according frontend module on a protected page in the frontend.
The management board helps you to track the sales, checkins live, track box office sales, revert checkins.
There is a box office included. Place the frontend module on a protected page in the frontend.
The box office helps you to track the sales and checkins live, track box office sales and revert checkins.

### After the event

Export an excel report with all tickets sold, find out the most important ticket agency, get to know, when visitors check in most frequently.
Export an excel report with all tickets sold, find out the most important ticket agency, get to know, when visitors
check in most frequently.

How to use it
=============
-------------

### Installation with Composer:

Expand All @@ -43,7 +48,7 @@ Add these minimum configuration to your composer.json.
```json
{
"require": {
"richardhj/contao-onlinetickets": "^0.9.1"
"richardhj/contao-onlinetickets": "^0.10.0"
},
"repositories": [
{
Expand All @@ -65,10 +70,11 @@ Add these minimum configuration to your composer.json.

We are using the templates provided by [`isotope_docuemts`](https://github.com/katgirl/isotope_documents).

To export the online tickets within an isotope document (e.g. the invoice), simple modify the `iso_document_….html5`. Add the following lines to the end of the template file.
To export the online tickets within an isotope document (e.g. the invoice), simple modify the `iso_document_….html5`.
Add the following lines to the end of the template file.

```php
<?php if (null !== ($objTickets = OnlineTicket\Model\Ticket::findByOrder($this->collection->id))): ?><div style="font-size: 72.5%; font-family: Helvetica, sans-serif; float:left; page-break-before:always;">
<?php if (null !== ($objTickets = Richardhj\Isotope\OnlineTickets\Model\Ticket::findByOrder($this->collection->id))): ?><div style="font-size: 72.5%; font-family: Helvetica, sans-serif; float:left; page-break-before:always;">
<table cellspacing="0" cellpadding="0" border="0" width="100%" style="margin-left:100px;" >
<tr>
<td colspan="3" style="text-align:center;"><img src="http://isotopeecommerce.org/files/layout/logo.png" alt="Isotope eCommerce" height="100"></td>
Expand All @@ -90,7 +96,7 @@ To export the online tickets within an isotope document (e.g. the invoice), simp
</tr>
<tr>
<td colspan="2" style="line-height:2;">&nbsp;</td>
<td rowspan="3"><img src="<?php echo OnlineTicket\Helper\QrCode::getLocalPath($objTickets->hash); ?>" alt="Ticket Code"></td>
<td rowspan="3"><img src="<?php echo Richardhj\Isotope\OnlineTickets\Helper\QrCode::getLocalPath($objTickets->hash); ?>" alt="Ticket Code"></td>
</tr>
<tr>
<td style="line-height:1.5;"><strong>Veranstaltung</strong></td>
Expand Down Expand Up @@ -121,15 +127,61 @@ To export the online tickets within an isotope document (e.g. the invoice), simp
<?php endwhile; ?>
</table>
</div><?php endif; ?>

```

### Personalize hard tickets

There are two supported cases for selling identifiable hard tickets:

#### Hard tickets have a white cut-out

Imagine you order hard tickets for you event. You can design it however you want to. You just need to leave a white
cut-out on the ticket, where you can print the barcode on.

In the Contao backend, go to "Events". Configure the current event and click on "Pre printed tickets". Now you enter the
facts of your ticket:
1) The width and height of one single hard ticket
2) The elements you want to print on the ticket, most likely the barcode and/or ticket number. Therefore you have to
enter the position of the white cut-out of your hard ticket as x- and y-coordinate in millimeters.
3) Specify the font to use (for the ticket number) and the size of the QR-Code, barcode etc.

Now, you are supposed to create a new Agency ("Vorverkaufsstelle"). Define, how many tickets they get to sell. Then
click on the button "export pdf" for the particular agency. You get a pdf with the size and elements defined before.
Place your hard tickets in the printer and print the pdf.

#### Self-printed tickets

Imagine you want to print the hard tickets on your own, because you only print a few or don't use that much color, so
that ordered hard tickets of a print shop are not profitable.

After you created an event, create a new Agency ("Vorverkaufsstelle"). Define, how many tickets they get to sell. Then
click on the button "export" for the particular agency. You will get the ticket numbers and bar codes as a CSV-file. Now
the best idea is to download a "Code 3 of 9 font". Install this font on your computer. Then create a new InDesign
document and design your ticket. Cut-out the barcode. Now you use InDesigns function of "Datenzusammenführung", to load
the CSV file within InDesign and create identifiable tickets. Print them.

### Usage of the TicketPay app

You need to point the url `https://api.ticketpay.de/` to your contao installation or you need to enter the IPv4 address pointing to your contao installtion.
Then you can log in with your contao credentials. The events, orders and tickets will get fetched and you are ready to perform the checkin.
You need to point the url `https://api.ticketpay.de/` to your contao installation.
Then you can log in with your contao credentials. The events, orders and tickets will get fetched via this url and you
are ready to perform the checkin.

To check the entrypoint is configured properly, you can request
`https://api.ticketpay.de/api/userLogin?username=test&password=test` and should get the message:

To check the entrypoint is configured properly, you can request `https://api.ticketpay.de/api/UserLogin?username=test&password=test` or `192.168.0.…/api/UserLogin?username=test&password=test` (one of the endpoints should work) and should get the message:
```json
{"Errorcode":1,"Errormessage":"Zugangsdaten nicht richtig"}
```
{"Errorcode":1,"Errormessage":"Unbekanntes Terminal"}
```

License
-------

The GNU Lesser General Public License (LGPL) v3.

Keep in mind:

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING
THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU
ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
19 changes: 12 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,29 @@
"email": "[email protected]"
},
"require": {
"php": "^5.4 || ^7.0",
"isotope/isotope-core": "^2.3",
"php": "^5.5 || ^7.0",
"cliffparnitzky/user-member-bridge": "^1.2",
"contao-community-alliance/dependency-container": "^1.8",
"contao-community-alliance/url-builder": "^1.2",
"contao-community-alliance/events-contao-bindings": "^3.5",
"contao-community-alliance/meta-palettes": "^1.10",
"contao-community-alliance/translator": "^2.0",
"cliffparnitzky/user-member-bridge": "^1.2"
"contao-community-alliance/url-builder": "^1.2",
"isotope/isotope-core": "^2.3",
"phpoffice/phpexcel": "^1.8",
"symfony/http-foundation": "^2.7 || ^3.0"
},
"suggest": {
"katgirl/isotope-documents": "Enhanced Isotope PDF templates to choose from"
},
"autoload": {
"psr-0": {
"OnlineTicket\\": "src/"
"psr-4": {
"Richardhj\\Isotope\\OnlineTickets\\": "src/"
}
},
"extra": {
"contao": {
"sources": {
"entrypoint-api": "api",
"assets": "assets/tickets",
"module": "system/modules/onlinetickets"
}
}
Expand Down
2 changes: 1 addition & 1 deletion entrypoint-api/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
/**
* Run the controller
*/
$controller = new \OnlineTicket\Api\Entrypoint();
$controller = new \Richardhj\Isotope\OnlineTickets\Api\EntryPoint();
$controller->run();
1 change: 0 additions & 1 deletion module/config/autoload.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
;;
requires[] = "core"
requires[] = "isotope"
requires[] = "isotope_feepassing"

;;
; Configure what you want the autoload creator to register
Expand Down
11 changes: 11 additions & 0 deletions module/config/autoload.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

/**
* This file is part of richardhj/contao-onlinetickets.
*
* Copyright (c) 2016-2017 Richard Henkenjohann
*
* @package richardhj/contao-onlinetickets
* @author Richard Henkenjohann <[email protected]>
* @copyright 2016-2017 Richard Henkenjohann
* @license https://github.com/richardhj/contao-onlinetickets/blob/master/LICENSE
*/


/**
* Register the templates
Expand Down
37 changes: 24 additions & 13 deletions module/config/config.php
Original file line number Diff line number Diff line change
@@ -1,41 +1,52 @@
<?php

/**
* Contao Open Source CMS
* Copyright (c) 2005-2015 Leo Feyer
* This file is part of richardhj/contao-onlinetickets.
*
* @license LGPL-3.0+
* Copyright (c) 2016-2017 Richard Henkenjohann
*
* @package richardhj/contao-onlinetickets
* @author Richard Henkenjohann <[email protected]>
* @copyright 2016-2017 Richard Henkenjohann
* @license https://github.com/richardhj/contao-onlinetickets/blob/master/LICENSE
*/

use Richardhj\Isotope\OnlineTickets\Helper\Checkout;
use Richardhj\Isotope\OnlineTickets\Helper\DataHandling;
use Richardhj\Isotope\OnlineTickets\Model\Agency;
use Richardhj\Isotope\OnlineTickets\Model\Event;
use Richardhj\Isotope\OnlineTickets\Model\Ticket;
use Richardhj\Isotope\OnlineTickets\Module\BoxOffice;


/**
* Back end modules
*/
$GLOBALS['BE_MOD']['isotope']['onlinetickets_events'] = [
'tables' => ['tl_onlinetickets_events', 'tl_onlinetickets_agencies'],
'tables' => [Event::getTable(), Agency::getTable()],
'icon' => 'system/modules/calendar/assets/icon.gif',
'report' => ['OnlineTicket\Helper\DataHandling', 'exportEventReport'],
'export' => ['OnlineTicket\Helper\DataHandling', 'exportAgencyBarcodes'],
'export_pdf' => ['OnlineTicket\Helper\DataHandling', 'exportPreprintedTicketsPdf']
'report' => [DataHandling::class, 'exportEventReport'],
'export' => [DataHandling::class, 'exportAgencyBarcodes'],
'export_pdf' => [DataHandling::class, 'exportPreprintedTicketsPdf'],
];


/**
* Front end modules
*/
$GLOBALS['FE_MOD']['application']['boxoffice'] = 'OnlineTicket\Module\BoxOffice';
$GLOBALS['FE_MOD']['application']['boxoffice'] = BoxOffice::class;


/**
* Models
*/
$GLOBALS['TL_MODELS'][\OnlineTicket\Model\Event::getTable()] = 'OnlineTicket\Model\Event';
$GLOBALS['TL_MODELS'][\OnlineTicket\Model\Ticket::getTable()] = 'OnlineTicket\Model\Ticket';
$GLOBALS['TL_MODELS'][\OnlineTicket\Model\Agency::getTable()] = 'OnlineTicket\Model\Agency';
$GLOBALS['TL_MODELS'][Event::getTable()] = Event::class;
$GLOBALS['TL_MODELS'][Ticket::getTable()] = Ticket::class;
$GLOBALS['TL_MODELS'][Agency::getTable()] = Agency::class;


/**
* Hooks
*/
$GLOBALS['ISO_HOOKS']['preCheckout'][] = ['OnlineTicket\Helper\Checkout', 'setTicketsInDatabase'];
$GLOBALS['ISO_HOOKS']['postCheckout'][] = ['OnlineTicket\Helper\Checkout', 'activateTicketsInDatabase'];
$GLOBALS['ISO_HOOKS']['preCheckout'][] = [Checkout::class, 'setTicketsInDatabase'];
$GLOBALS['ISO_HOOKS']['postCheckout'][] = [Checkout::class, 'activateTicketsInDatabase'];
11 changes: 11 additions & 0 deletions module/dca/tl_iso_producttype.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

/**
* This file is part of richardhj/contao-onlinetickets.
*
* Copyright (c) 2016-2017 Richard Henkenjohann
*
* @package richardhj/contao-onlinetickets
* @author Richard Henkenjohann <[email protected]>
* @copyright 2016-2017 Richard Henkenjohann
* @license https://github.com/richardhj/contao-onlinetickets/blob/master/LICENSE
*/


/**
* Table tl_iso_producttype
Expand Down
13 changes: 11 additions & 2 deletions module/dca/tl_module.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
<?php


/**
* Table tl_user
* This file is part of richardhj/contao-onlinetickets.
*
* Copyright (c) 2016-2017 Richard Henkenjohann
*
* @package richardhj/contao-onlinetickets
* @author Richard Henkenjohann <[email protected]>
* @copyright 2016-2017 Richard Henkenjohann
* @license https://github.com/richardhj/contao-onlinetickets/blob/master/LICENSE
*/


/**
* Table tl_user
*/
$GLOBALS['TL_DCA']['tl_module']['palettes']['boxoffice'] =
'{title_legend},name,headline,type;{config_legend};{template_legend:hide};{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space';
Loading

0 comments on commit 74219d8

Please sign in to comment.