Changeset 339
- Timestamp:
- Oct 29, 2008 12:09:10 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/examples/_config.inc.php
r316 r339 22 22 define('SITE_BASE', dirname(__FILE__)); 23 23 24 // Set include path for all templates .24 // Set include path for all templates and libraries. 25 25 ini_set('include_path', join(PATH_SEPARATOR, array( 26 26 COMMON_BASE, -
trunk/lib/Cart.inc.php
r336 r339 157 157 'extended_price' => $quantity * $item['price'], 158 158 )); 159 } 159 return true; 160 } else { 161 return false; 162 } 163 return true; 164 } 165 } 166 167 /* 168 * Set the absolute price value of a specified item in a cart. 169 * 170 * @access public 171 * @param 172 * @return 173 * @author Quinn Comendant <quinn@strangecode.com> 174 * @version 1.0 175 * @since 10 May 2008 16:42:25 176 */ 177 function setPrice($item_id, $price) 178 { 179 if (isset($_SESSION['_cart'][$this->_ns]['items'][$item_id])) { 180 $item = $_SESSION['_cart'][$this->_ns]['items'][$item_id]; 181 $_SESSION['_cart'][$this->_ns]['items'][$item_id] = array_merge($item, array( 182 'price' => $price, 183 'extended_price' => $price * $item['quantity'], 184 )); 185 return true; 186 } else { 187 return false; 160 188 } 161 189 } … … 177 205 unset($_SESSION['_cart'][$this->_ns]['items'][$item_id]); 178 206 $app->logMsg(sprintf('Removed %s from cart', $item_id), LOG_DEBUG, __FILE__, __LINE__); 207 return true; 208 } else { 209 return false; 179 210 } 180 211 }
Note: See TracChangeset
for help on using the changeset viewer.