Changeset 21006
- Timestamp:
- 2011/07/02 21:20:34 (13 years ago)
- Location:
- branches/version-2_11-dev/data/class
- Files:
-
- 4 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); -
branches/version-2_11-dev/data/class/pages/shopping/LC_Page_Shopping_Confirm.php
r20820 r21006 99 99 100 100 // カートの商品を取得 101 $this->arrShipping = $objPurchase->getShippingTemp( );101 $this->arrShipping = $objPurchase->getShippingTemp(true); 102 102 $this->arrCartItems = $objCartSess->getCartList($this->cartKey); 103 103 // 合計金額 -
branches/version-2_11-dev/data/class/pages/shopping/LC_Page_Shopping_Multiple.php
r20984 r21006 283 283 $objPurchase->clearShipmentItemTemp(); 284 284 285 foreach ($arrValues as $shipping_id => $arrVal) { 286 $objPurchase->saveShippingTemp($arrVal, $shipping_id); 287 } 288 285 289 foreach ($arrItemTemp as $other_deliv_id => $arrProductClassIds) { 286 290 foreach ($arrProductClassIds as $product_class_id => $quantity) { … … 291 295 } 292 296 293 foreach ($arrValues as $shipping_id => $val) {294 $objPurchase->saveShippingTemp($val, $shipping_id);295 }296 297 297 // $arrValues[0] には, 購入者の情報が格納されている 298 298 $objPurchase->saveOrderTemp($uniqid, $arrValues[0], $objCustomer); -
branches/version-2_11-dev/data/class/pages/shopping/LC_Page_Shopping_Payment.php
r20970 r21006 82 82 83 83 // カートの情報を取得 84 $this->arrShipping =& $objPurchase->getShippingTemp( );84 $this->arrShipping =& $objPurchase->getShippingTemp(true); 85 85 86 86 $this->is_multiple = $objPurchase->isMultiple();
Note: See TracChangeset
for help on using the changeset viewer.