Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D Discount Contributions
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Extensions
  • Discount Contributions
  • Merge requests
  • !1

Extend it so other contribution pages can have discount code

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged agileware_pengyi requested to merge agileware_pengyi/discountcontributions:PROJ-1243 into master Apr 06, 2020
  • Overview 2
  • Commits 3
  • Pipelines 0
  • Changes 1

Implemented a function to check if there is a discount code set for the price set or not. Display the code field based on the result. Remove the hardcoded ID and allow the discount to be applied on other pages.

So, the discount code field will be displayed on the contribution page if:

  • there is any discount code that set for this price set
  • there is any discount code which can be applied to any price set

Regardless of:

  • the discount code is invalid
  • the discount code is set for events/membership

In these two cases, the field will be shown but will be failed on validation step.

Before

The discount only works for a specific page

After

Discount works on all contribution pages

Comments

Can be better, but that is it for now.

Agileware ref: PROJ-1243

Edited Apr 07, 2020 by agileware_pengyi
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: PROJ-1243