AntonyThorpe\SilverShopJsonResponse\SilvershopJsonResponse
ShopJsonResponse
Json Response for shopping cart of Silverstripe Shop
Synopsis
class SilvershopJsonResponse
extends Extension
{
- // members
- private static array $allowed_actions = ;
- // methods
- public HTTPResponse get()
- public void updateAddResponse()
- public void updateRemoveResponse()
- public void updateRemoveAllResponse()
- public void updateSetQuantityResponse()
- public void updateClearResponse()
- public void updateVariationFormResponse()
- public void updateAddProductFormResponse()
- public array getCurrentShoppingCart()
- protected array getCurrentShoppingCartItems()
- protected array getCurrentShoppingCartModifiers()
Hierarchy
Extends
- SilverStripe\Core\Extension
Members
private
-
$allowed_actions
Allow get action to obtain a copy of the shopping cart
Methods
protected
- getCurrentShoppingCartItems() — Provide a copy of the current order's items, including image details and variations
- getCurrentShoppingCartModifiers() — Provide a copy of the current order's modifiers
public
- get() — get the shopping cart
- getCurrentShoppingCart() — Provide a copy of the current order in the required format Note the id is the cart's id
- updateAddProductFormResponse() — Add one of an item to a cart (Product Page)
- updateAddResponse() — Add one of an item to a cart (Category Page)
- updateClearResponse() — Clear all items from the cart (Cart Page)
- updateRemoveAllResponse() — Remove all of an item from a cart (Cart Page) Quantity is NIL
- updateRemoveResponse() — Remove one of an item from a cart (Cart Page)
- updateSetQuantityResponse() — Update the quantity of an item in a cart (Cart Page)
- updateVariationFormResponse() — Update the variations of a product (Cart Page)