SharedShoppingCartReader

Implements \SharedShoppingCartReaderInterface

Class SharedShoppingCartReader

category

System

package

SharedShoppingCart

Methods

SharedShoppingCartReader constructor.

__construct(\CI_DB_query_builder $db) 

Arguments

$db

\CI_DB_query_builder

Creates a shared shopping cart instance from an array.

createSharedShoppingCartFromArray(array $rawShoppingCart) : boolean|\SharedShoppingCart
Throws
\InvalidArgumentException

Arguments

$rawShoppingCart

array

Response

boolean|\SharedShoppingCart

Gets the content in JSON format of the shopping cart corresponding to the hash

getShoppingCart(\StringType $shoppingCartHash) : string

Arguments

$shoppingCartHash

\StringType

Hash of the shopping cart

Response

string

JSON representation of the shopping cart

Gets a collection of all shared shopping carts by a given customer ID.

getShoppingCartsByCustomerId(\IdType $customerId) : \SharedShoppingCartCollection

Arguments

$customerId

\IdType

Response

\SharedShoppingCartCollection

Properties

db

db : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder