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

Add multi-year domain purchases #860

Closed
wants to merge 10 commits into from
Closed

Conversation

umurkontaci
Copy link
Contributor

This PR enables users to purchase domains for more than 1 year. As this is a big change, we're adding a feature flag to enable it when we're ready.

Screenshot

image

Testing

You'll need to test this with D341-code.

  • Add a domain to the cart
  • Go to checkout
  • Change the year from the select box
  • Buy the domain
  • Make sure the domain is registered for the duration you have picked
  • Make sure you are charged the correct amount
  • If you opted for a privacy protection, make sure you are charged for it correctly as well.
  • Cancel the domain you've just registered

@umurkontaci umurkontaci added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Feature Group] Emails & Domains Features related to email integrations and domain management. [Feature] Purchase Management Related to managing purchases such as subscriptions, plans, history, auto-renew, cancellation, etc. labels Nov 26, 2015
@umurkontaci umurkontaci self-assigned this Nov 26, 2015
@umurkontaci umurkontaci force-pushed the add/multi-year-domain branch from 7b2a565 to e8cda0b Compare December 15, 2015 16:33
@umurkontaci umurkontaci added [Status] In Progress [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] In Progress labels Dec 17, 2015
@dmsnell
Copy link
Member

dmsnell commented Dec 28, 2015

@umurkontaci looks like we have some merge conflicts - does this need a rebase?

@umurkontaci umurkontaci force-pushed the add/multi-year-domain branch from e8cda0b to 9502b6d Compare December 28, 2015 21:43
@umurkontaci
Copy link
Contributor Author

@dmsnell Yup, thanks for the ping. Rebased now

@@ -319,12 +319,14 @@ function businessPlan( slug, properties ) {
*
* @param {Object} productSlug - the unique string that identifies the product
* @param {string} domain - domain name
* @param {Number} volume
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems more natural to me to use the word quantity to specify how many of a specific product item we want in the cart. Maybe we can have some others chime in. volume sounds a bit odd to me and maybe misleading (though maybe I don't understand this well enough!)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

volume is the name that's being used in the WP codebase, hence the usage.

@dmsnell
Copy link
Member

dmsnell commented Jan 5, 2016

thanks for rebasing @umurkontaci - it looks like there are now a few anachronisms after the update and I pointed out one or two, but we should probably make sure the style matches the surrounding code if the old stuff had been updated since this PR was born.

@dmsnell dmsnell added [Status] Needs Author Reply and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jan 5, 2016
@umurkontaci umurkontaci force-pushed the add/multi-year-domain branch from 9502b6d to eb2f5d9 Compare January 11, 2016 23:08

"manage/customize": true,
"manage/customize": true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've used spaces here - it will look weird for anyone that has configured tab to be expanded to something else than 2 spaces :)

@umurkontaci umurkontaci force-pushed the add/multi-year-domain branch 2 times, most recently from 7f6abbd to dc57031 Compare January 26, 2016 01:43
@umurkontaci umurkontaci force-pushed the add/multi-year-domain branch from dc57031 to 2236727 Compare January 26, 2016 01:49
@umurkontaci
Copy link
Contributor Author

@dmsnell @klimeryk I've updated and rebased the code. Do you mind taking a look at it?

We're shelving the option to buy multi-year domains for now. But I would rather keep this code merged rather than having to keep track of everything to rebase.

@umurkontaci umurkontaci added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] Needs Author Reply labels Jan 26, 2016
@dmsnell
Copy link
Member

dmsnell commented Jan 26, 2016

@umurkontaci I'm a bit confused - why would we be merging this code if we aren't enabling the feature? Wouldn't it make more sense to leave the code out of the repository until we need it?

@umurkontaci
Copy link
Contributor Author

No it wouldn't. If we are not merging this code, by the time we are ready to launch, everything in this code would be irrelevant / stale and I have rewrite the whole thing all over again.

@dmsnell
Copy link
Member

dmsnell commented Jan 26, 2016

If we are not merging this code, by the time we are ready to launch, everything in this code would be irrelevant / stale and I have rewrite the whole thing all over again.

That's kind of my point. If we merge this in, it seems like it will sit as dead code if and until we decide to allow multi-year purchases, and by the time that happens, this will all be irrelevant / stale and we will have to redo it all anyway, so why not just let this branch go (or bookmark it) and defer the development until we need it - otherwise we'll just be adding an unnecessary maintenance burden, unless I misunderstand you

@umurkontaci
Copy link
Contributor Author

It will still be less work to do though. We would have to test the stuff to be working again and make small adjustments, but this piece will be included in code refactoring processes. Refactoring a bunch of functions is easier than coming with an old code and adjusting the whole to the 10 times refactored code.

It would be unnecessary maintenance burden if we were adding something we didn't know we'd need it or not.

This PR has been thoroughly tested in here and in pre-oss. I don't want to throw everyone's work away.

@dmsnell
Copy link
Member

dmsnell commented Jan 26, 2016

@umurkontaci no hard feeling if you end up merging this in, but if I understand you correctly I can't vote to do so - seems like a bad idea to me. I understand not wanting to throw everyone's work away, but that's not a compelling argument to me to put in dead code and I don't think that's the right way to look at this branch. in any case, this code will live on in git

feel free to ping other people for review. I appreciate your work on this.

@stephanethomas
Copy link
Contributor

I agree with @dmsnell, we shouldn't merge this pull request. This will add extra maintenance and introduce additional complexity for something that is not used - without mentioning that it will mislead developers who don't know this part of the code and who will wonder what it does and how it fits in the whole application.

@umurkontaci umurkontaci removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jan 26, 2016
@lancewillett lancewillett deleted the add/multi-year-domain branch February 15, 2016 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature Group] Emails & Domains Features related to email integrations and domain management. [Feature] Purchase Management Related to managing purchases such as subscriptions, plans, history, auto-renew, cancellation, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants