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

fix(donation): set minimum amount as the donation amount if it is less than the min amount, when saving the donation. #3249

Closed
emgk opened this issue May 23, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@emgk
Copy link
Member

commented May 23, 2018

User Story

As an Admin, I don't want minimum amount more than the donation amount at all so that the donor cannot proceed the donation with the less amount than the actual minimum amount.

Current Behavior

I currently can make the donation if the donation amount is less than the minimum amount and if I don't change the amount field on the front-end.

Expected Behavior

When saving the donation form in the backend and if the set donation amount is less than the minimum amount then make the minimum amount same as the actual donation amount.

Possible Solution

Make the minimum amount same as the donation amount if the donation amount is less than the donation minimum amount.

Visuals

screenshot-cs test-2018 05 23-12-16-40

@raftaar1191

This comment has been minimized.

Copy link
Member

commented May 30, 2018

Finding

This is not working when the Donation Option is set as Multi-level Donation
image

We can used give_get_lowest_price_option function to get he lowest price

@raftaar1191 raftaar1191 reopened this May 30, 2018

@ravinderk

This comment has been minimized.

Copy link
Collaborator

commented May 31, 2018

@raftaar1191 It is fine. Multi level does not follow this minimum donation rule. You can set level with donation amount minimum then custom donation amount.
We follow same rule in js also. You can process donation whatever set as level.

@ravinderk ravinderk closed this May 31, 2018

@ravinderk

This comment has been minimized.

Copy link
Collaborator

commented May 31, 2018

@raftaar1191 I am able to reproduce this

@ravinderk ravinderk reopened this May 31, 2018

@ravinderk ravinderk closed this in 18d0770 May 31, 2018

@emgk

This comment has been minimized.

Copy link
Member Author

commented May 31, 2018

Re-opening this issue because:

  1. This issue must be solved for Set Donation donation form's type only, and not for the multi-level donation form.
  2. found !empty( $post_data['give-price-id'] ) which is wrong so need to test it.

@emgk emgk reopened this May 31, 2018

@ravinderk ravinderk closed this in 41d8492 May 31, 2018

@ravinderk ravinderk reopened this May 31, 2018

ravinderk added a commit that referenced this issue May 31, 2018

fix(form): show error if donation level does not match to amount pass2
do not need to return value from this fn

ref #3249

ravinderk added a commit that referenced this issue May 31, 2018

ravinderk added a commit that referenced this issue May 31, 2018

@ravinderk ravinderk closed this May 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.