Skip to content

Shopping cart #15

Closed
Closed
@bleroy

Description

@bleroy

The shopping cart is an implementation of an IShoppingCart abstraction.

Shopping cart model

Properties:

  • id
  • list of line items
  • decimal Subtotal
  • TaxAmount Taxes
  • decimal Total
  • int ItemCount

Methods:

  • Add(productId, quantity, attributeValues)
  • Remove(productId, attributeValues)
  • Clear()

TBD: how do we interface this with shipping? Nwazet stores country, zip code, and shipping option on the cart.

Note: some missing methods from Nwazet may be added back as needed. Some signatures simplified and some methods changed to properties. This is all subject to revision, of course.

Shopping cart line items

  • Quantity
  • Product
  • attributeValues
  • Price
  • OriginalPrice

Implementations

Implementations of the shopping cart abstraction will have pluggable persistence (client storage, database, session, etc.). Details TBD.

Rendering

The cart is rendered through a widget, which has a shopping cart part that is responsible for querying the shopping cart from the active implementation and generate a shape from it.

The checkout page will also interact with the shopping cart (in Nwazet, there's a checkout controller with its own views, we may or may not do things differently to allow for more flexibility; we may also introduce more workflow features).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions