From de2e96a298cc48b8e86a03d530bc328bd43b0c80 Mon Sep 17 00:00:00 2001 From: Andrew Seymour Date: Tue, 13 Dec 2011 16:44:59 +0000 Subject: Added the ability to get the contents in a different order --- user_guide_src/source/libraries/cart.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'user_guide_src/source/libraries/cart.rst') diff --git a/user_guide_src/source/libraries/cart.rst b/user_guide_src/source/libraries/cart.rst index 850d7e9a8..a1e042ef2 100644 --- a/user_guide_src/source/libraries/cart.rst +++ b/user_guide_src/source/libraries/cart.rst @@ -266,10 +266,13 @@ $this->cart->total_items(); Displays the total number of items in the cart. -$this->cart->contents(); +$this->cart->contents(boolean); ************************ -Returns an array containing everything in the cart. +Returns an array containing everything in the cart. You can sort the order, +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); ********************************* -- cgit v1.2.3-24-g4f1b From f75ec11d7ed0592f930dd3a090db7c1c6d251eed Mon Sep 17 00:00:00 2001 From: Andrew Seymour Date: Wed, 14 Dec 2011 09:36:39 +0000 Subject: Added in a remove item from cart function to save the "hacky" method of updating a product with 0 quantity, updated the changelog to reflect and to be neater and more readable surrounding the changes of the Cart library --- user_guide_src/source/libraries/cart.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'user_guide_src/source/libraries/cart.rst') diff --git a/user_guide_src/source/libraries/cart.rst b/user_guide_src/source/libraries/cart.rst index a1e042ef2..fbf777884 100644 --- a/user_guide_src/source/libraries/cart.rst +++ b/user_guide_src/source/libraries/cart.rst @@ -256,6 +256,11 @@ $this->cart->update(); Permits you to update items in the shopping cart, as outlined above. +$this->cart->remove(rowid); +********************** + +Allows you to remove an item from the shopping cart by passing it the rowid. + $this->cart->total(); ********************* -- cgit v1.2.3-24-g4f1b