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

Can't add coupon to offer #41

Open
freakinhuge opened this issue Feb 21, 2018 · 2 comments · May be fixed by #49
Open

Can't add coupon to offer #41

freakinhuge opened this issue Feb 21, 2018 · 2 comments · May be fixed by #49

Comments

@freakinhuge
Copy link

When trying to apply a coupon to an offer that is not deferrable, an error is thrown saying amount is nil. The coupon partial should probably not be rendered for a non-deferrable offer if you can't apply a coupon to non-deferrable offers or handle the fact that amount is nil when submitted from the coupon form for a non-deferrable offer.

@loldlm1 loldlm1 linked a pull request Mar 2, 2018 that will close this issue
@franzejr
Copy link
Contributor

What @loldlm1 did was: "If an offer is not deferrable, then we can't apply coupons".

This should be like this, @adamdill ? Just making sure before merging his PR.

@franzejr
Copy link
Contributor

@loldlm1, what you did was just not show the coupon partial when we have a deferrable offer. This is not correct, after talking with @adamdill. We need to be able to apply coupons when the offer is deferrable.

Here are two flows we need to make sure we have(you can add these as tests - spinach):

1. No coupons on offers without amounts:

  • Given an offer exists
  • And the offer doesn’t have an amount (ie a tithe)
  • Then we should not be able to apply a coupon to that offer

2. Coupons should work on deferrable offers

  • Given an offer exists
  • And the offer is defferable
  • Then we should be able to apply a coupon to that offer

Can you do that?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants