-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
get membership type ID and number of terms from price_x fields #22825
Conversation
(Standard links)
|
I think this is correct @agh1 @mattwire @monishdeb throughs? |
Quite a few fails - eg api_v3_ContributionPageTest::testSubmit |
02449cc
to
ea65917
Compare
OK - the test failures in The failures in |
ea65917
to
c656704
Compare
Test this please |
@eileenmcnaughton or @seamuslee001 can one of you merge this PR? |
Done |
https://lab.civicrm.org/dev/membership/-/issues/41
Guest starring: https://issues.civicrm.org/jira/browse/CRM-21177
Overview
When multiple auto-renew memberships are available for selection on a contribution page, the recurring contribution will take the frequency unit and frequency interval from the first membership option, regardless of which is chosen.
Before
Wrong recurring contribution settings.
After
Correct recurring contribution settings.
Technical Details
I started a more limited fix, but saw the
@todo
to stop using theselectMembership
param, so I incorporated that. This actually reduced LOC.getRecurDetails
is removed because it's I removed the only reference to it. It also can't return the correct value except by accident. It tries to deduce the values with a price set ID, which is impossible - you need the price field value ID.Comments
Once I fixed membership#41, I realized that CRM-21177 was an almost identical issue (frequency interval vs. frequency unit). This also meant a unit test existed, though I needed to extend it to handle frequency unit testing.
This will break the unit tests in
CRM_Contribute_Form_Contribution_MainTest
. They pass in theSelectMembership
the@todo
said to not rely on. If we agree that this is the correct approach, I'll modify those tests to pass aprice_x
field and aprice_field_id
instead.