Skip to content

Define Cart Methods #5

Description

@stresslimit

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions