Changeset 468 for trunk/lib/Cart.inc.php
- Timestamp:
- Feb 20, 2014 3:03:59 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:mergeinfo
set to
/branches/eli_branch merged eligible
-
Property
svn:mergeinfo
set to
-
trunk/lib/Cart.inc.php
r396 r468 71 71 72 72 // Namespace of this instance. 73 var$_ns;73 private $_ns; 74 74 75 75 // Configuration parameters for this object. 76 var$_params = array(76 private $_params = array( 77 77 ); 78 78 … … 80 80 * Cart constructor. 81 81 */ 82 function Cart($namespace='')82 public function __construct($namespace='') 83 83 { 84 84 $app =& App::getInstance(); … … 97 97 * @param array $params Array of param keys and values to set. 98 98 */ 99 function setParam($params=null)99 public function setParam($params=null) 100 100 { 101 101 if (isset($params) && is_array($params)) { … … 112 112 * @return mixed Configured parameter value. 113 113 */ 114 function getParam($param)114 public function getParam($param) 115 115 { 116 116 $app =& App::getInstance(); … … 137 137 * @since 11 Mar 2008 18:59:37 138 138 */ 139 function add($item_id, $price, $quantity=1, $specs=array())139 public function add($item_id, $price, $quantity=1, $specs=array()) 140 140 { 141 141 $app =& App::getInstance(); … … 166 166 * @since 10 May 2008 16:42:25 167 167 */ 168 function setQty($item_id, $quantity)168 public function setQty($item_id, $quantity) 169 169 { 170 170 if ($quantity <= 0) { … … 195 195 * @since 10 May 2008 16:42:25 196 196 */ 197 function setPrice($item_id, $price)197 public function setPrice($item_id, $price) 198 198 { 199 199 if (isset($_SESSION['_cart'][$this->_ns]['items'][$item_id])) { … … 218 218 * @since 11 Mar 2008 18:59:48 219 219 */ 220 function remove($item_id)220 public function remove($item_id) 221 221 { 222 222 $app =& App::getInstance(); … … 242 242 * @since 11 Mar 2008 18:59:55 243 243 */ 244 function get($item_id, $spec_key)244 public function get($item_id, $spec_key) 245 245 { 246 246 if (isset($_SESSION['_cart'][$this->_ns]['items'][$item_id][$spec_key])) { … … 259 259 * @since 11 Mar 2008 18:59:55 260 260 */ 261 function getList()261 public function getList() 262 262 { 263 263 return $_SESSION['_cart'][$this->_ns]['items']; … … 277 277 * @since 11 Mar 2008 19:00:12 278 278 */ 279 function sum($key='extended_price')279 public function sum($key='extended_price') 280 280 { 281 281 $sum = 0; … … 306 306 * as $auth->clear(), such as when logging out. 307 307 */ 308 function clear()308 public function clear() 309 309 { 310 310 $_SESSION['_cart'][$this->_ns] = array( … … 313 313 } 314 314 } 315 316 317 ?>
Note: See TracChangeset
for help on using the changeset viewer.