summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cart.php
diff options
context:
space:
mode:
authorAhmad Anbar <aanbar@gmail.com>2014-02-11 21:55:47 +0100
committerAhmad Anbar <aanbar@gmail.com>2014-02-11 21:55:47 +0100
commitf69f1822558645aa00944b436558fb6948f42aa9 (patch)
treee5f333c272ce26e2a20c906b2a8e61568bfec69f /system/libraries/Cart.php
parentbe1496d1a8618ef186047468009c7e3e0640183b (diff)
Allow updating all properties for an item.
Diffstat (limited to 'system/libraries/Cart.php')
-rw-r--r--system/libraries/Cart.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php
index 5a31a1d45..b00ccd862 100644
--- a/system/libraries/Cart.php
+++ b/system/libraries/Cart.php
@@ -350,7 +350,11 @@ class CI_Cart {
}
else
{
- $this->_cart_contents[$items['rowid']]['qty'] = $items['qty'];
+ // find updatable keys
+ $keys = array_intersect(array_keys($this->_cart_contents[$items['rowid']]), array_keys($items));
+ foreach ( $keys as $key ) {
+ $this->_cart_contents[$items['rowid']][$key] = $items[$key];
+ }
}
return TRUE;