Class SharedShoppingCartRepository
Class SharedShoppingCartRepository
- SharedShoppingCartRepository implements SharedShoppingCartRepositoryInterface
Package: SharedShoppingCart
Category: System
Located at Services/Core/ShoppingCart/SharedShoppingCartRepository.inc.php
Category: System
Located at Services/Core/ShoppingCart/SharedShoppingCartRepository.inc.php
Methods summary
public
__construct( SharedShoppingCartReader $reader, SharedShoppingCartWriter $writer, SharedShoppingCartDeleter $deleter )
SharedShoppingCartRepository constructor.
public
storeShoppingCart( StringType $jsonShoppingCart, IdType $userId = null )
: string
Stores the cart and returns the hash
public
getShoppingCart( StringType $shoppingCartHash )
: string
Gets the content in JSON format of the shopping cart corresponding to the hash
public
deleteShoppingCartsOlderThan( DateTime $expirationDate )
Deletes all shared shopping carts that are expired
public
deleteShoppingCartsByCustomerId( IdType $customerId )
Deletes all shared shopping carts by a given customer ID.
public
getShoppingCartsByCustomerId( IdType $customerId )
: SharedShoppingCartCollection
Gets a collection of all shared shopping carts by a given customer ID.