Registration price_adjustment

Hi there

We’re hoping to use the registration feature in Indico and are looking for a way to offer a number of different prices for tickets. I see there are a couple of threads related to this on Github but they haven’t had any updates recently.

While looking through the registration model I see there’s a price_adjustment field and, after creating a registration, if I put a negative figure in the that DB column the this is reflected on the ‘invoice’ which is great:

So this seems to get us a lot of the way there but we will need to implement a feature to determine the adjustment based on the user input. This will likely be quite specific to our project but I’m happy to share our solution when we get there. Out of interest, are there any features in core that use this field? A quick grep of the code base only shows what I’ve seen through the UI:

./indico/modules/events/registration/models/    price_adjustment = db.Column(
./indico/modules/events/registration/models/        price_adjustment = self.price_adjustment or Decimal('0')
./indico/modules/events/registration/models/        return (base_price + price_adjustment + calc_price).max(0)
./indico/modules/events/registration/models/    def render_price_adjustment(self):
./indico/modules/events/registration/models/        return self._render_price(self.price_adjustment)
./indico/modules/events/registration/templates/display/_registration_summary_blocks.html:                    {% if registration.price_adjustment %}

No, there is currently no UI to set the price adjustment except by doing it manually through indico shell. We initially added it to deal with cases during the data migration from legacy indico (1.x) where the stored price did not match the sum of items (due to inconsistent data) - that way the price adjustment allowed us to keep the final price the same.

However, it is a feature that would be very useful to expose in the management area (just like being able to change the base price for a registration which is currently copied from the regform settings when the user registers and cannot be changed later).

Thanks @ThiefMaster

I have, by chance, just discovered that I can control the registration price using a choice field:

This seems to be exactly what we need! Is there anything we need to know about using this approach?

Thanks again!

No, this is fine - just keep in mind that the registrant can of course choose the cheaper option, and if you have e.g. paypal enabled they could pay right after registering. So in such a case you’d need to manually deal with making them pay the difference (Indico does not support multiple payments for a single registration).

Great! This is actually perfect for us @ThiefMaster as we’re operating a ‘honour’ system but depending on how that goes we might need to implement something more robust in the future!

Is this feature documented anywhere? I’d be happy to contribute to the documentation if not :slight_smile:

The registration docs are somewhat basic, but I’m not sure if it’s worth updating them now since at some point we want to improve registration management a lot (the whole UI to configure the form is ultra-legacy angularjs that’s not really maintainable).

OK good to know. Thanks very much for your help!