diff options
author | Ahmad Anbar <aanbar@gmail.com> | 2014-02-13 11:59:18 +0100 |
---|---|---|
committer | Ahmad Anbar <aanbar@gmail.com> | 2014-02-13 11:59:18 +0100 |
commit | da2bdf2b95a55f03aadfb6a1d21a90a0fff627db (patch) | |
tree | d65092d82b11791ae0be3c315201bbb1f1b12039 /user_guide_src | |
parent | 576439fda03d4e81cb5b0cfed371f7776a73fe3a (diff) |
Re-arranged documentation, fixed comment.
Diffstat (limited to 'user_guide_src')
-rw-r--r-- | user_guide_src/source/libraries/cart.rst | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/user_guide_src/source/libraries/cart.rst b/user_guide_src/source/libraries/cart.rst index 6d0dd2e3a..a0870e34a 100644 --- a/user_guide_src/source/libraries/cart.rst +++ b/user_guide_src/source/libraries/cart.rst @@ -206,9 +206,7 @@ Updating The Cart To update the information in your cart, you must pass an array containing the Row ID and quantity to the $this->cart->update() -function, you may also update any property you have previously -defined when inserting the item such as options, price -or other custom fields you defined. +function. .. note:: If the quantity is set to zero, the item will be removed from the cart. @@ -217,7 +215,6 @@ or other custom fields you defined. $data = array( 'rowid' => 'b99ccdf16028f015540f341130b6d8ec', - 'price' => 10, 'qty' => 3 ); @@ -242,6 +239,20 @@ or other custom fields you defined. $this->cart->update($data); +You may also update any property you have previously +defined when inserting the item such as options, price +or other custom fields you defined. + +:: + $data = array( + 'rowid' => 'b99ccdf16028f015540f341130b6d8ec', + 'qty' => 1, + 'price' => 49.95, + 'coupon' => NULL + ); + + $this->cart->update($data); + What is a Row ID? ***************** |