diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-10-25 16:29:52 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-10-25 16:29:52 +0200 |
commit | cdeee661db2438cc65304f704ab4bcebeccb9b7d (patch) | |
tree | aff34eb215aafd608a6a78aca079f67d0b828529 /user_guide_src | |
parent | 60b97145a0cb1c3bba35ec68be7eae911b2b331c (diff) |
Add CI_Cart::get_item() (rel #400)
Diffstat (limited to 'user_guide_src')
-rw-r--r-- | user_guide_src/source/changelog.rst | 7 | ||||
-rw-r--r-- | user_guide_src/source/libraries/cart.rst | 14 |
2 files changed, 14 insertions, 7 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 477440675..0933212e9 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -173,9 +173,10 @@ Release Date: Not Released - Added *max_filename_increment* config setting. - Added an "index" parameter to the ``data()`` method. - :doc:`Cart library <libraries/cart>` changes include: - - It now auto-increments quantity's instead of just resetting it, this is the default behaviour of large e-commerce sites. - - Product Name strictness can be disabled via the Cart Library by switching "$product_name_safe". - - Added function remove() to remove a cart item, updating with quantity of 0 seemed like a hack but has remained to retain compatibility. + - It now auto-increments quantity instead of just resetting it, this is the default behaviour of large e-commerce sites. + - *Product Name* strictness can be disabled by switching the ``$product_name_safe`` property to FALSE. + - Added method ``remove()`` to remove a cart item, updating with quantity of 0 seemed like a hack but has remained to retain compatibility. + - Added method ``get_item()`` to enable retrieving data for a single cart item. - :doc:`Image Manipulation library <libraries/image_lib>` changes include: - The initialize() method now only sets existing class properties. - Added support for 3-length hex color values for *wm_font_color* and *wm_shadow_color* properties, as well as validation for them. diff --git a/user_guide_src/source/libraries/cart.rst b/user_guide_src/source/libraries/cart.rst index 6594b3b9a..716e94bcb 100644 --- a/user_guide_src/source/libraries/cart.rst +++ b/user_guide_src/source/libraries/cart.rst @@ -279,16 +279,22 @@ by which this is returned by passing it "true" where the contents will be sorted from newest to oldest, by leaving this function blank, you'll automatically just get first added to the basket to last added to the basket. -$this->cart->has_options(rowid); -******************************** +$this->cart->get_item($row_id); +******************************* + +Returns an array containing data for the item matching the specified row ID, +or FALSE if no such item exists. + +$this->cart->has_options($row_id); +********************************** Returns TRUE (boolean) if a particular row in the cart contains options. This function is designed to be used in a loop with $this->cart->contents(), since you must pass the rowid to this function, as shown in the Displaying the Cart example above. -$this->cart->product_options(rowid); -************************************ +$this->cart->product_options($row_id); +************************************** Returns an array of options for a particular product. This function is designed to be used in a loop with $this->cart->contents(), since you |