derhansen / sf_event_mgt

An event management and registration extension for TYPO3 CMS based on ExtBase and Fluid.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[!!!][FEATURE] Add price variant functionality

derhansen opened this issue · comments

The current price option feature is not flexible enough to allow mutliple prices for an event. It is not possible to name the price options and it is currently always required to have a validity for the price option. The getters getActivePriceOptions() and getCurrentPrice() are specially crafted to return price options and the price based on the validity of a price option.

The price option functionality will therefore be deprecated and removed in version 8 of the extension

A new price variant functionality will be added as following:

  • Inline field in event record to support one or multiple price variants
  • Each price variant has a "Title", a "Description" and a "Price"
  • Support for fe_group, start- and stop-time
  • Allow sorting of price variants in event record

The event domain model will be extended/changed as following:

  • Getter and setter for price variants. Getter returns price variants sorted by sort order in backend
  • getActivePriceOptions() will be removed
  • Getter getCurrentPrice() which either returns the price field (if no price variant is defined) or the price of the lowest price variant.

The registration model will be extended as following:

  • New field price where the final price is saved
  • New field price_variant, where the selected price variant is saved

The saveRegistration() will be extended as following:

  • Determine and save the price for the event. Either price field if no price variant is given or the price of price_variant if given
  • Save the selected price_variant
  • Ensure only available/valid price variants can be saved
  • Add PSR-14 event to modify price before persistence