phpDocumentor

SharedShoppingCartReader
in package
implements SharedShoppingCartReaderInterface

Class SharedShoppingCartReader

Tags
category

System

Interfaces, Classes and Traits

SharedShoppingCartReaderInterface
Interface SharedShoppingCartReaderInterface

Table of Contents

$db  : CI_DB_query_builder
__construct()  : mixed
SharedShoppingCartReader constructor.
getShoppingCart()  : string
Gets the content in JSON format of the shopping cart corresponding to the hash
getShoppingCartsByCustomerId()  : SharedShoppingCartCollection
Gets a collection of all shared shopping carts by a given customer ID.
createSharedShoppingCartFromArray()  : bool|SharedShoppingCart
Creates a shared shopping cart instance from an array.

Properties

Methods

__construct()

SharedShoppingCartReader constructor.

public __construct(CI_DB_query_builder $db) : mixed
Parameters
$db : CI_DB_query_builder
Return values
mixed

getShoppingCart()

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

public getShoppingCart(StringType $shoppingCartHash) : string
Parameters
$shoppingCartHash : StringType

Hash of the shopping cart

Return values
string

JSON representation of the shopping cart

createSharedShoppingCartFromArray()

Creates a shared shopping cart instance from an array.

protected createSharedShoppingCartFromArray(array<string|int, mixed> $rawShoppingCart) : bool|SharedShoppingCart
Parameters
$rawShoppingCart : array<string|int, mixed>
Tags
throws
InvalidArgumentException
Return values
bool|SharedShoppingCart

Search results