Giter VIP home page Giter VIP logo

pretix-question-placeholders's Introduction

Email content based on question answers

This is a plugin for pretix.

Add content to your emails based on the questions the customer answered, and the answer they gave.

You can create multiple new placeholders, and can add several rules for each of them, with fallback texts for other answers or unanswered questions.

Development setup

  1. Make sure that you have a working pretix development setup.
  2. Clone this repository.
  3. Activate the virtual environment you use for pretix development.
  4. Execute python setup.py develop within this directory to register this application with pretix's plugin registry.
  5. Execute make within this directory to compile translations.
  6. Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in the 'plugins' tab in the settings.

This plugin has CI set up to enforce a few code style rules. To check locally, you need these packages installed:

pip install flake8 isort black docformatter

To check your plugin for rule violations, run:

docformatter --check -r . black --check . isort -c . flake8 .

You can auto-fix some of these issues by running:

docformatter -r . isort . black .

To automatically check for these issues before you commit, you can run .install-hooks.

License

Copyright 2021 Tobias Kunze

Released under the terms of the Apache License 2.0

pretix-question-placeholders's People

Contributors

rixx avatar

Watchers

Toshaan Bharvani avatar James Cloos avatar  avatar  avatar

pretix-question-placeholders's Issues

How can I use this plugin?

Hey @rixx, thanks a lot for writing this plugin! It sounds like a useful thing for us, but in fact after installing it I didn't find where and how to use this in Pretix. And as you said here yourself, your README doesn't help with it either yet.

I could potentially figure out details myself, but I'd need a starting point. Could you give a very brief description what the plugin does and how to use it?

  • Which emails can I use this in? Automatic emails? Emails send out manually? Scheduled emails?
  • Which placeholders can I use?
  • What's the rule system? Can I make sth like if-else blocks within the email text to send out different texts depending on a question answer?

I'd already be happy about a short description, or about a hint in which file in your plugin source code I could get this information from myself. Thanks!

use the placeholders as custom variables in the pdf ticket output

Hey,

I would like to replace some question answer from the booking process with some specific content and put it as a text variable (like a normal question) into a ticket template. Is there any way of implementing this within the plugin as an option to also register the replacement as a pretix.base.signals.layout_text_variables?

(for context: I've got a question about the food preference and the users can select one of the provided dishes from a list of dishes. Now I don't want to output the name of the dish directly but want to have a replacement string there instead.)

Improve README

I just came back to this my own project after two years and had completely forgotten what it does. The README did not help all that much. Should have clearer description and maybe a screenshot or two.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.