Skip to content

Update shopping cart example #1107

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

Merged
merged 4 commits into from
Jan 3, 2018
Merged

Update shopping cart example #1107

merged 4 commits into from
Jan 3, 2018

Conversation

hootlex
Copy link
Member

@hootlex hootlex commented Dec 29, 2017

Checkout related mutations

  • The mutations that update the checkoutStatus can be independent of the ones that alter the cart items.
  • Added the SET_CART_ITEMS and SET_CHECKOUT_STATUS mutations and removed the CHECKOUT_* ones to make debugging easier.

Cart module getters

  • The cartProducts could live within cart module’s getters instead of the root getters.
  • The total price of the cart should be a getter instead of a computed property.

Abbreviations

Replace the p variable name abbreviation with product to make the example easier to read.

Copy link
Collaborator

@chrisvfritz chrisvfritz left a comment

Choose a reason for hiding this comment

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

@hootlex Very well-described changes and nice, incremental changes! I don't see anything that isn't an improvement. @ktsn What do you think?

Copy link
Member

@ktsn ktsn left a comment

Choose a reason for hiding this comment

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

LGTM. Great job!

@ktsn ktsn merged commit 59c39b6 into vuejs:dev Jan 3, 2018
@hootlex hootlex deleted the SCUpdate branch January 10, 2018 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants