Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to quota / create quota directly from the product creation form #475

Closed
raphaelm opened this issue Apr 21, 2017 · 11 comments
Closed

Add to quota / create quota directly from the product creation form #475

raphaelm opened this issue Apr 21, 2017 · 11 comments

Comments

@raphaelm
Copy link
Member

Hey! If you ever wanted to contribute to an Open Source project, but didn't know how, you just found a perfect place to start. We try to write this issue as instructive as possible, but as we're humans we almost certainly forgot to write something important in here. If you want to try to tackle this issue and get stuck at any point, please do not hesitate and ask us, either here on GitHub or via email at support@pretix.eu. We'll be very happy to help!

We think this issue is very suitable to people who are just starting with Python or Django development or who never contributed to Open Source before. We'd like to ask people with wide experience in these areas to leave this issue to beginners. Thanks! (If you want something more advanced, just drop us a line, we'll find something 😉)

How to get started

First of all, you need pretix running locally on your machine. We have a guide on the developer installation over here. Play around with it and get a feeling for what pretix is and how it works :) Try to find the places in the interface mentioned in this issue where something needs to change. Maybe try to find the same places in the code? Just searching for characteristic words can be a powerful tool to find your way around.

What this is about

If you want to sell tickets with pretix, you first need to create a product. In the code, that is often called an "item" (sorry for this confusion). Then, you need to add it to a quota, so the system know how often the product can be sold.

It would be nice to be able to select either "Add this to existing quota […]" or "Create a new quota for this product of size […]" right when creating a product, so you don't need to think of the second step.

How to do this

You need to add new, custom fields to ItemCreateForm in pretix/control/forms/item.py. Then, you need to display them in a clear way in the template pretix/control/templates/pretixcontrol/item/create.html. For saving the data, you might need to add some logic to the form_valid method of ItemCreate in pretix/control/views/item.py.

I want to give it a try!

You're still reading, nice! If you want to try working on this, please comment below, so everyone else knows this is being looked at and can search for a different place to contribute.

First, fork the repository to your own GitHub account. Then clone it locally (or set it as your remote if you already cloned it earlier) and prepare your pull requests. There are a number of tutorials on the Pull Request workflow online, for example this short version by GitHub itself and this more in-depth tutorial. We're excited to see your pull request!

And don't forget: If you get stuck, don't hestitate to ask. We bound ourselves to a Code of Conduct and we're committed to providing a welcoming experience and giving constructive, friendly and useful feedback on your contributions.

@efpo
Copy link

efpo commented Apr 21, 2017

Hey! I'd like to give this one a try

@raphaelm
Copy link
Member Author

Hi @efpo, sure, go ahead and let me know if you have any questions!

@parkcl
Copy link
Contributor

parkcl commented May 28, 2017

Hi, could I take this on?

@raphaelm
Copy link
Member Author

Hi @parkcl, if @efpo doesn't want to continue working on this, you can, yes

@Ivan-Rdrgz
Copy link

Hey, just wondering if @parkcl is still working on this issue. If not, I'd really like to give this a shot.

@raphaelm
Copy link
Member Author

Not sureif @parkcl even started, giving the lack of answer by @efpo

@parkcl
Copy link
Contributor

parkcl commented Jun 28, 2017

I haven't started, was waiting on @efpo to reply. Doesn't appear he/she has even forked the repo in 2 months to work on it.

@raphaelm
Copy link
Member Author

I don't feel @efpo will answer. So if you want to go ahead, @parkcl, you've been first here ;) @Ivan-Rdrgz, maybe you want to look at #528?

@parkcl
Copy link
Contributor

parkcl commented Jun 28, 2017

Thanks @raphaelm. I will begin work on it this week :)

@Ivan-Rdrgz
Copy link

@raphaelm I just looked at #528 and would really like to fix the issue, although I'm somewhat of a novice. It would be awesome if I could get a short explanation of how I should go about fixing it.

@raphaelm
Copy link
Member Author

raphaelm commented Jul 2, 2017

Hi @Ivan-Rdrgz, "unfortunately" someone else noticed that #528 is fixed already :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants