Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

[Checkout] Implement mergeCarts #905

@paliarush

Description

@paliarush

A user should be able to start adding items to cart as a guest and proceed to checkout as logged in customer. At the moment each cart has unique hash ID and there is no way for a registered customer to proceed to checkout with the cart he created as a guest.

Suggested solution is to introduce mutation for merging two arbitrary carts accessible by the specific user.

Acceptance criteria:

  • Schema mergeCarts(firstCartId: String!, secondCartId: String!): String!, result should contain new cart ID
  • Mutation should accept:
    • guest + guest cart IDs
    • guest + registered customer cart IDs
    • registered customer + registered customer cart IDs
  • Permissions to access registered customer carts must always be verified. In case permissions are insufficient, error message must be obscured (for security purposes) and should indicate that specified cart cannot be found
  • Web API functional tests must cover all major positive scenarios and combinations
  • For performance optimization, new cart ID should point to one of the existing carts used during the merge instead of creation of completely new cart object
  • Original cart IDs must be disabled and become inaccessible. Even though one of the carts will still be active, it must be accessible only with a new unique ID

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions