Skip to content

itk-dev/dpl_pretix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

203 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DPL pretix

DPL CMS module for integration with the pretix ticketing platform.

Builds on ideas and experiences from https://github.com/itk-dev/itk_pretix.

Installation

https://www.drupal.org/project/dpl_pretix

Enable the module and go to /admin/config/dpl_pretix to configure the module.

Usage

The module will add a "pretix" section on all events.

pretix settings: /admin/config/dpl_pretix

Log messages: /admin/reports/dblog?type[]=dpl_pretix

pretix

We need a template event in pretix, and this template event will be cloned to create new events in pretix.

The template event must

  1. be a multiple dates event
  2. have a single subevent (date)

Mapping DPL CMS data to pretix data

DPL CMS uses the Recurring Events module to create and manage events. Technically, a event actually consists of an event series entity and a number of associated event instance entities. See the Recurring Events module page and documentation pages, e.g. Recurring Events Main Module, for further details and explanations.

An event instance in DPL CMS is mapped to an event in pretix, and an event instances are mapped to a dates (sub-events). As a special case, an event series with only one instance can be mapped to a singular event in pretix, i.e. the single instance is not mapped to an object in pretix. See the pretix User Guide for details on pretix and its events.

So far, so good … how this is actually done is a little (more) complicated.

Hooks

Warning

Incomplete section ahead!

A number of Drupal hooks are implemented to make event and dates in pretix reflect event series and instances in DPL CMS.

First, the obvious ones:

And them a less obvious one (from Recurring Events) used to make everything fall into place:

Edit event

Warning

Incomplete section ahead!

Delete event

Warning

Incomplete section ahead!

pretix API client

As of now, we cannot composer require dependencies when building custom modules for DPL CMS, and therefore we use a slightly customized version of itk-dev/pretix-api-client-php to talk to pretix.

Two of the dependencies of itk-dev/pretix-api-client-php (doctrine/collections and guzzlehttp/guzzle) are (indirectly) required by DPL CMS.

The dependency on symfony/options-resolver can we, under duress, choose to live without, and a small patch removes use of the OptionsResolver component.

See the build:pretix-api-client task in Taskfile.yml for details on how the modified version of itk-dev/pretix-api-client-php is actually built.

Coding standards

task dev:coding-standards:check
docker run --rm --volume "$PWD:/mnt" koalaman/shellcheck:stable scripts/create-release scripts/code-analysis

Code analysis

task dev:code-analysis

[itk-dev/pretix-api-client-phpDPL CMS: https://github.com/danskernesdigitalebibliotek/dpl-cms/ pretix: https://pretix.eu/about/en/ "Ticketing software that cares about your event—all the way."

docker compose build && docker compose run --rm php scripts/create-release dev-test

Translations

Use Translation extractor to extract translations.

After installing the module in Drupal, run

drush drupal_translation_extractor:translation:extract da --dump-messages --sort asc --force module:dpl_pretix --output=%source/translations/%module.%locale.po

to extract translations for the dpl_pretix module. Remove dpl_pretix's vendor folder before extracting translations.

New in 10.1

  • On an event series with multiple event instances, the user is forced to edit instances on the “Edit instances“ page
    • The “Dates“ group is replaced with a reference to the Edit instances page
  • An event instance with pretix orders cannot be deleted
  • The “Relevant for ticket manager” field can be disabled
  • User roles can be denied access to “Delete event instance“

About

Ding module for integration with the Pretix ticketing platform

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages