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

Check user is trying to checkout with current cart #2901



Copy link

@notbakaneko notbakaneko commented Apr 4, 2018

Check that the user is trying to checkout with the current cart instead of an old one when beginning checkout. This resolves an issue where a user tries to checkout in one tab but deletes and creates a new cart in a different tab.

A side-effect of this is; trying to do a free checkout with a non-free order will now force the page to reload instead of showing the loading overlay forever (still won't checkout).
That was a bug :D

notbakaneko added 3 commits Apr 4, 2018
It'll fail the `$order->order_id !== $orderId` condition, or fail
`beginCheckout()` if both are null.
@@ -37,13 +37,14 @@ export class StoreCheckout

$(@CHECKOUT_SELECTOR).on 'click.checkout', (event) =>
provider =
orderId =

This comment has been minimized.


nanaya Apr 4, 2018

looks like some already have orderNumber, maybe use that instead?

This comment has been minimized.


notbakaneko Apr 4, 2018
Author Collaborator

orderNumber is for external reference

nanaya approved these changes Apr 4, 2018
@nanaya nanaya merged commit b0b15e2 into ppy:master Apr 4, 2018
2 checks passed
2 checks passed
continuous-integration/styleci/pr The analysis has passed
continuous-integration/travis-ci/pr The Travis CI build passed
@notbakaneko notbakaneko deleted the notbakaneko:feature/store/check-stale-cart-checkout branch Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants