Change Quantity Module

Created on 23 June 2013, over 11 years ago
Updated 1 February 2023, almost 2 years ago

I would like a “Change quantity” link added to the user/uid/subscription page. This page would allow the user to adjust quantities of a plan up or down.

The module should be aware of the settings configuration>Web Services>Recurly> for “Upgrade plan behavior” and “Downgrade plan behavior”.

I think there might need to be some logic to hide or show both the “change plan” link as well as the “change quantity” link on the list page. When in multiple-plan mode, you don’t really need a “change plan” option, although I suppose it doesn't really hurt. But not everyone will want a “change quantity” option.

Feature request
Status

Fixed

Version

4.0

Component

User interface

Created by

🇺🇸United States JayShoe

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States eojthebrave Minneapolis, MN
  • @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
  • 🇺🇸United States blakehall

    This looks good to me, and I really like this approach.

  • Status changed to Fixed almost 2 years ago
  • 🇺🇸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.

Production build 0.71.5 2024