Toast\ShopAPI\Model\CartModel
Class CartModel
Synopsis
class CartModel
extends ShopModelBase
{
- // members
- protected $id;
- protected $hash;
- protected $total_items;
- protected $total_price;
- protected $total_price_nice;
- protected $subtotal_price;
- protected $subtotal_price_nice;
- protected $cart_link;
- protected $checkout_link;
- protected array $items = ;
- protected $wish_list_link;
- protected array $wish_list_items = ;
- protected $total_wish_list_items;
- protected $compare_list_link;
- protected array $compare_list_items = ;
- protected $total_compare_list_items;
- protected array $modifiers = ;
- protected static array $fields = ;
- // Inherited members from ShopModelBase
- protected Order $order;
- protected ShoppingCart $cart;
- protected $code;
- protected $status;
- protected $called_method;
- protected $message;
- protected bool $cart_updated;
- protected array $refresh;
- protected integer $total_items;
- protected $currency;
- protected $currency_symbol;
- protected $cart_link;
- protected $checkout_link;
- protected $continue_link;
- protected $elapsed;
- protected $shipping_id;
- protected static array $fields;
- // methods
- public void __construct()
- public array addItem()
- public array addVariation()
- public void applyCoupon()
- public array clear()
- public void getHash()
- public void updateShipping()
- public void getShipping()
- public void getWishList()
- public void getCompareList()
- // Inherited methods from ShopModelBase
- public void __construct()
- public void get()
- public void getActionResponse()
- public void getSiteCurrency()
- public void getSiteCurrencySymbol()
- public void getStatus()
- public void getCalledMethod()
- public void getMessage()
- public void getCode()
- public void setStatus()
- public void setCalledMethod()
- public void setMessage()
- public void setCode()
Hierarchy
Tasks
Line | Task |
---|---|
308 | Check if Discounts module is installed |
389 | Check if the Shipping module is installed |
Members
protected
- $called_method — string
- $cart — SilverShop\Cart\ShoppingCart
- $cart_link
- $cart_link — string
- $cart_updated — Toast\ShopAPI\Model\bool
- $checkout_link
- $checkout_link — string
- $code — int
- $compare_list_items
- $compare_list_link
- $continue_link — string
- $currency — string
- $currency_symbol — string
- $elapsed — string
- $fields
- $fields
- $hash
- $id
- $items
- $message — string
- $modifiers
- $order — SilverShop\Model\Order
- $refresh — array
- $shipping_id
- $status — string
- $subtotal_price
- $subtotal_price_nice
- $total_compare_list_items
- $total_items
- $total_items — int
- $total_price
- $total_price_nice
- $total_wish_list_items
- $wish_list_items
- $wish_list_link
Methods
public
- __construct()
- addItem() — Add a plain item (no variations)
- addVariation() — Add a product that has variations
- applyCoupon()
- clear() — Remove all items from the cart
- getCompareList()
- getHash()
- getShipping()
- getWishList()
- updateShipping()
Inherited from Toast\ShopAPI\Model\ShopModelBase
public
- get()
- getActionResponse()
- getCalledMethod()
- getCode()
- getMessage()
- getSiteCurrency()
- getSiteCurrencySymbol()
- getStatus() — ----------------------------------------- Getters ----------------------------------------
- setCalledMethod()
- setCode()
- setMessage()
- setStatus() — ----------------------------------------- Setters ----------------------------------------