- Timestamp:
- 2011/07/02 21:20:34 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/data/class/helper/SC_Helper_Purchase.php
r20975 r21006 75 75 $orderId = $this->registerOrderComplete($orderTemp, $objCartSession, 76 76 $cartkey); 77 $shippingTemp =& $this->getShippingTemp(); 78 if (count($shippingTemp) > 1) { 79 foreach ($shippingTemp as $shippingId => $val) { 80 $this->registerShipmentItem($orderId, $shippingId, 81 $val['shipment_item']); 82 } 77 $shippingTemp =& $this->getShippingTemp(true); 78 foreach ($shippingTemp as $shippingId => $val) { 79 $this->registerShipmentItem($orderId, $shippingId, 80 $val['shipment_item']); 83 81 } 84 82 … … 282 280 283 281 /** 284 * セッションの配送情報を取得する. 285 */ 286 function getShippingTemp() { 282 * 配送情報をセッションから取得する. 283 * 284 * @param bool $has_shipment_item 配送商品を保有している配送先のみ返す。 285 */ 286 function getShippingTemp($has_shipment_item) { 287 if ($has_shipment_item) { 288 $arrReturn = array(); 289 foreach ($_SESSION['shipping'] as $key => $arrVal) { 290 if (count($arrVal['shipment_item']) == 0) continue; 291 $arrReturn[$key] = $arrVal; 292 } 293 return $arrReturn; 294 } 295 287 296 return $_SESSION['shipping']; 288 297 } … … 342 351 function getShippingPref() { 343 352 $results = array(); 344 foreach ( $_SESSION['shipping']as $val) {353 foreach (SC_Helper_Purchase_Ex::getShippingTemp(true) as $val) { 345 354 $results[] = $val['shipping_pref']; 346 355 } … … 354 363 */ 355 364 function isMultiple() { 356 return count( $this->getShippingTemp()) > 1;365 return count(SC_Helper_Purchase_Ex::getShippingTemp(true)) > 1; 357 366 } 358 367 … … 364 373 * @return void 365 374 */ 366 function saveShippingTemp(&$arrSrc, $shipping_id = 0) { 375 function saveShippingTemp($arrSrc, $shipping_id = 0) { 376 // 配送商品は引き継がない 377 unset($arrSrc['shipment_item']); 378 367 379 if (empty($_SESSION['shipping'][$shipping_id])) { 368 380 $_SESSION['shipping'][$shipping_id] = $arrSrc; … … 649 661 $objQuery->delete($table, $where, array($order_id)); 650 662 651 663 foreach ($arrParams as $key => $arrShipping) { 652 664 653 665 $arrValues = $objQuery->extractOnlyColsOf($table, $arrShipping);
Note: See TracChangeset
for help on using the changeset viewer.