Class SharedShoppingCartController

Class SharedShoppingCartController

HttpViewController implements HttpViewControllerInterface
SharedShoppingCartController

Methods summary

public actionDefault( void ) : JsonHttpControllerResponse

Adds products of a shared shopping cart to the current shopping cart of the customer .

public actionStoreShoppingCart( void ) : JsonHttpControllerResponse

Stores the current shopping cart content and creates a hash to address the shopping cart.

protected _getCart( void ) : array

Extracts product information from the current shopping cart. The returned array is structured as follows: array( productId => , quantity => , [combiId => ], [attributes => array( attributeId => , attributeValueId => )] )

protected _storeShoppingCart( array $products ) : string

Stores the given product information as a shopping cart. The expected array parameter has to be structured as follows: array( productId => , quantity => , [combiId => ], [attributes => array( attributeId => , attributeValueId => )] )

protected _getSharedCart( void ) : array|mixed

Gathers shopping cart information from a stored cart in JSON format.

protected _addProductToCart( PropertiesControl $propertiesControl, stdClass $product )

Adds a product from given product information to the current shopping cart.

Methods inherited from HttpViewController

__construct(), _callActionMethod(), _getPostData(), _getPostDataCollection(), _getQueryParameter(), _getQueryParametersCollection(), _getServerData(), _render(), _validatePageToken(), getTemplateFile(), proceed()

Properties summary

Properties inherited from HttpViewController

$assets, $contentView, $httpContextReader, $httpResponseProcessor, $postDataArray, $queryParametersArray, $serverDataArray