diff options
author | Ahmad Anbar <aanbar@gmail.com> | 2014-02-11 21:55:47 +0100 |
---|---|---|
committer | Ahmad Anbar <aanbar@gmail.com> | 2014-02-11 21:55:47 +0100 |
commit | f69f1822558645aa00944b436558fb6948f42aa9 (patch) | |
tree | e5f333c272ce26e2a20c906b2a8e61568bfec69f /system/libraries/Cart.php | |
parent | be1496d1a8618ef186047468009c7e3e0640183b (diff) |
Allow updating all properties for an item.
Diffstat (limited to 'system/libraries/Cart.php')
-rw-r--r-- | system/libraries/Cart.php | 6 |
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; |