- @eojthebrave opened merge request.
- 🇺🇸United States eojthebrave Minneapolis, MN
This new MR contains an updated version of the some functionality provided by the previous patch. As well as incorporates ideas from ✨ Allow users to subscribe to a single plan multiple times Closed: duplicate . Essentially what we're doing here is letting someone sign up for the same plan multiple times.
I moved most of the functionality into the recurly module instead of recurlyjs because this feature works regardless of if you're using Recurly JS or hosted pages. I also updated the form for changing the quantity of an existing subscription so that it has a confirmation step that informs you about the changes that are going to be made to your account. This uses the subscription preview API to have Recurly calculate the changes, and generate what is essentially a dry run invoice showing the charges and or credits that will be applied to your account as a result of making this change. This seems a lot more reliable than trying to perform this calculation ourselves given all the possible permutations of credits/charges/refunds and how different payment providers handle those.
And the form now requires you to preview the change before you can save the change.
Finally, I added tests for both the addition of the quantity field on the Recurly JS checkout form, and for the form for changing your subscription quantity in the main recurly module.
- Status changed to RTBC
almost 2 years ago 8:43pm 31 January 2023 - 🇺🇸United States blakehall
This looks good to me, and I really like this approach.
-
eojthebrave →
committed 2459efbb on 4.x
Issue #2025995 by eojthebrave, blakehall, JayShoe: Change Quantity...
-
eojthebrave →
committed 2459efbb on 4.x
- Status changed to Fixed
almost 2 years ago 7:06pm 1 February 2023 - 🇺🇸United States eojthebrave Minneapolis, MN
Thanks for the review @blakehall. I merged the code from MR12 and this feature is now available in the 4.x-dev branch and will be in the next release. There may still be some additional edge-cases to sort out, but we can open new issues to deal with anything that comes up.
- 🇺🇸United States eojthebrave Minneapolis, MN
There's a patch above that works in Drupal 7 (we're using on Drupalize.Me) but it would need to be refactored a bit to match the features in the Drupal 8+ / 4.x branch of the module. The big change would be in moving the change quantity form and related code into the base recurly module instead of the recurlyjs module.
Given that in the last 6 years Blake (who also works on Drupalize.Me with me) and I are the only ones who seem to be using this patch it doesn't seem like a feature that anyone needs right now. And new projects should probably be built with Drupal 9 and the 4.x version of this module anyway.
Automatically closed - issue fixed for 2 weeks with no activity.