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

Define Cart Methods #5

Open
stresslimit opened this issue May 13, 2016 · 0 comments
Open

Define Cart Methods #5

stresslimit opened this issue May 13, 2016 · 0 comments

Comments

@stresslimit
Copy link
Contributor

Return values for getCart and emptyCart are simple enough, but for addToCart, removeFromCart, updateQuantity, etc, what should we return? Do cart update methods just return success/error, or the whole cart object again? I'm tempted to return the whole cart again so that we don't have to make another trip to the server to update cart. Options:

  • if we return success/err, we have to then go back to the server again to get the updated cart
  • if we return the new cart object, we save this extra request. If we don't want to change Phoenix, at least the library can do the 2 calls for us and make it simpler to implement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant