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

Obtain submission price from variable #4770

Open
wants to merge 7 commits into
base: stable/2.8.x
Choose a base branch
from

Commits on Oct 18, 2024

  1. 🗃️ [#4764] Add database field to store reference to price variable

    A third pricing mode for forms is being added, and for this one, we
    need to configure on the form which variable may contain the price.
    
    If a variable key is set, this implies that price-form-variable is
    in effect. Otherwise, logic rules will be checked, and finally,
    the configured product price will be used.
    
    The new property needs to be exposed only in the admin-permissions
    flavour of the form detail endpoint.
    sergei-maertens committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    181461d View commit details
    Browse the repository at this point in the history
  2. ✨ [#4764] Calculate the submission price from a variable, if set

    The fallback behaviour is weird - in principle the UI will make you
    choose between either variable, logic rules or product price, but
    the existing code already has some fallback behaviour.
    
    I'm not sure if we should crash hard if the reference variable doesn't
    produce something that can be used as price, or fall back to other
    behaviours. I'd rather crash hard at runtime. Something to discuss!
    sergei-maertens committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    9c93c26 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c7da8ac View commit details
    Browse the repository at this point in the history
  4. ✨ [#4764] Enable setting the submission price calculation to variable

    The form designer is now able to configure the price calculation mode
    so that a variable is used to get the final calculated price of the
    submission.
    sergei-maertens committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    32a29c3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3686f84 View commit details
    Browse the repository at this point in the history
  6. 📝 [#4764] Update documentation about products and payment

    Updated to mention the new option.
    sergei-maertens committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    9bd2738 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    10404b2 View commit details
    Browse the repository at this point in the history