ZenMagick 0.9.10


zenmagick.store.sf.mvc.controller.ajax\ZMAjaxShoppingCartController
mvc\controller\ajax\ZMAjaxShoppingCartController.php at line 33

Class ZMAjaxShoppingCartController

ZMObject
└─ZMController
└─ZMAjaxController
└─ZMAjaxShoppingCartController

public class ZMAjaxShoppingCartController
extends ZMAjaxController

Ajax controller for JSON shopping cart.

Author:
DerManoMann
Deprecated:
use ZMRpcController instead

Method Summary
void

__construct(string requestId)

Create new instance.

void

addProductJSON(ZMRequest request)

Add product to cart.

void

estimateShippingJSON(ZMRequest request)

Estimate shipping.

void

getContentsJSON(ZMRequest request)

Get cart content.

void

removeProductJSON(ZMRequest request)

Remove from cart.

void

updateProductJSON(ZMRequest request)

Update cart product.

Methods inherited from org.zenmagick.mvc.controller\ZMAjaxController
__construct, flattenObject, process, processGet, setJSONHeader, toJSON
Methods inherited from org.zenmagick.mvc.controller\ZMController
__construct, findView, getFormData, getId, getView, getViewData, isAjax, isFormSubmit, preProcess, process, processGet, processPost, setContentType, setId, setView, validate, validateFormData, validateSession
Methods inherited from org.zenmagick.core\ZMObject
__construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton

Method Detail

mvc\controller\ajax\ZMAjaxShoppingCartController.php at line 38

__construct

public void __construct(string requestId)

Create new instance.

Parameters:
requestId - Optional requestId; default is null to use the request id.

mvc\controller\ajax\ZMAjaxShoppingCartController.php at line 130

addProductJSON

public void addProductJSON(ZMRequest request)

Add product to cart.

Doesn't support attributes yet.

URL parameter:

productId
The product id
quantity
The product quantity
id
Attribute details

Will return the new cart contents.

Parameters:
request - The current request.

mvc\controller\ajax\ZMAjaxShoppingCartController.php at line 57

estimateShippingJSON

public void estimateShippingJSON(ZMRequest request)

Estimate shipping.

Parameters:
request - The current request.

mvc\controller\ajax\ZMAjaxShoppingCartController.php at line 98

getContentsJSON

public void getContentsJSON(ZMRequest request)

Get cart content.

Parameters:
request - The current request.

mvc\controller\ajax\ZMAjaxShoppingCartController.php at line 155

removeProductJSON

public void removeProductJSON(ZMRequest request)

Remove from cart.

Will return the new cart contents.

URL parameter:

productId
The product id

Parameters:
request - The current request.

mvc\controller\ajax\ZMAjaxShoppingCartController.php at line 181

updateProductJSON

public void updateProductJSON(ZMRequest request)

Update cart product.

Doesn't support attributes yet.

URL parameter:

productId
The product id
quantity
The product quantity

Will return the new cart contents.

Parameters:
request - The current request.

ZenMagick 0.9.10