Changeset 21514 for branches/version-2_12-dev/data/class/SC_CartSession.php
- Timestamp:
- 2012/02/15 19:56:17 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/SC_CartSession.php
r21510 r21514 52 52 // 1世代古いコピー情報は、削除しておく 53 53 foreach ($_SESSION as $k => $val) { 54 if ($k != $this->key_tmp && preg_match( "/^savecart_/", $k)) {54 if ($k != $this->key_tmp && preg_match('/^savecart_/', $k)) { 55 55 unset($this->cartSession[$productTypeId][$k]); 56 56 } … … 61 61 function getCancelPurchase($productTypeId) { 62 62 $ret = isset($this->cartSession[$productTypeId]['cancel_purchase']) 63 ? $this->cartSession[$productTypeId]['cancel_purchase'] : "";63 ? $this->cartSession[$productTypeId]['cancel_purchase'] : ''; 64 64 $this->cartSession[$productTypeId]['cancel_purchase'] = false; 65 65 return $ret; … … 171 171 172 172 if (!isset($this->cartSession[$productTypeId][$i]['price'])) { 173 $this->cartSession[$productTypeId][$i]['price'] = "";173 $this->cartSession[$productTypeId][$i]['price'] = ''; 174 174 } 175 175 … … 177 177 178 178 if (!isset($this->cartSession[$productTypeId][$i]['quantity'])) { 179 $this->cartSession[$productTypeId][$i]['quantity'] = "";179 $this->cartSession[$productTypeId][$i]['quantity'] = ''; 180 180 } 181 181 $quantity = $this->cartSession[$productTypeId][$i]['quantity']; … … 212 212 213 213 if (!isset($this->cartSession[$productTypeId][$i]['point_rate'])) { 214 $this->cartSession[$productTypeId][$i]['point_rate'] = "";214 $this->cartSession[$productTypeId][$i]['point_rate'] = ''; 215 215 } 216 216 $point_rate = $this->cartSession[$productTypeId][$i]['point_rate']; 217 217 218 218 if (!isset($this->cartSession[$productTypeId][$i]['id'][0])) { 219 $this->cartSession[$productTypeId][$i]['id'][0] = "";219 $this->cartSession[$productTypeId][$i]['id'][0] = ''; 220 220 } 221 221 $point = SC_Utils_Ex::sfPrePoint($price, $point_rate); … … 254 254 // 前頁として記録しないページを指定する。 255 255 $arrExclude = array( 256 "/shopping/"256 '/shopping/' 257 257 ); 258 258 $arrExclude = array_merge($arrExclude, $excludePaths); … … 260 260 // ページチェックを行う。 261 261 foreach ($arrExclude as $val) { 262 if (preg_match( "|" . preg_quote($val) . "|", $url)) {262 if (preg_match('|' . preg_quote($val) . '|', $url)) { 263 263 $exclude = true; 264 264 break; … … 337 337 for ($i = 0; $i <= $max; $i++) { 338 338 if(isset($this->cartSession[$productTypeId][$i]['cart_no']) 339 && $this->cartSession[$productTypeId][$i]['cart_no'] != "") {339 && $this->cartSession[$productTypeId][$i]['cart_no'] != '') { 340 340 341 341 // 商品情報は常に取得 … … 392 392 $max = $this->getMax($productTypeId); 393 393 for ($i = 0; $i <= $max; $i++) { 394 if ($this->cartSession[$productTypeId][$i]['cart_no'] != "") {394 if ($this->cartSession[$productTypeId][$i]['cart_no'] != '') { 395 395 $arrRet[] = $this->cartSession[$productTypeId][$i]['id'][0]; 396 396 } … … 408 408 $max = $this->getMax($productTypeId); 409 409 for ($i = 0; $i <= $max; $i++) { 410 if ($this->cartSession[$productTypeId][$i]['cart_no'] != "") {410 if ($this->cartSession[$productTypeId][$i]['cart_no'] != '') { 411 411 $arrRet[] = $this->cartSession[$productTypeId][$i]['id']; 412 412 } … … 518 518 function checkProducts($productTypeId) { 519 519 $objProduct = new SC_Product_Ex(); 520 $tpl_message = "";520 $tpl_message = ''; 521 521 522 522 // カート内の情報を取得 … … 538 538 $arrDeliv = SC_Helper_Purchase_Ex::getDeliv($productTypeId); 539 539 if (SC_Utils_Ex::isBlank($arrDeliv)) { 540 $tpl_message .= "※「". $product['name'] . "」はまだ配送の準備ができておりません。恐れ入りますがお問い合わせページよりお問い合わせください。\n";540 $tpl_message .= '※「' . $product['name'] . "」はまだ配送の準備ができておりません。恐れ入りますがお問い合わせページよりお問い合わせください。\n"; 541 541 $this->delProduct($item['cart_no'], $productTypeId); 542 542 } … … 550 550 $this->setProductValue($item['id'], 'quantity', $limit, $productTypeId); 551 551 $this->setProductValue($item['id'], 'total_inctax', SC_Helper_DB_Ex::sfCalcIncTax($item['price']) * $limit, $productTypeId); 552 $tpl_message .= "※「". $product['name'] . "」は販売制限(または在庫が不足)しております。一度に数量{$limit}を超える購入はできません。\n";552 $tpl_message .= '※「' . $product['name'] . "」は販売制限(または在庫が不足)しております。一度に数量{$limit}を超える購入はできません。\n"; 553 553 } else { 554 554 $this->delProduct($item['cart_no'], $productTypeId); 555 $tpl_message .= "※「". $product['name'] . "」は売り切れました。\n";555 $tpl_message .= '※「' . $product['name'] . "」は売り切れました。\n"; 556 556 continue; 557 557 } … … 618 618 */ 619 619 function calculate($productTypeId, &$objCustomer, $use_point = 0, 620 $deliv_pref = "", $charge = 0, $discount = 0, $deliv_id = 0) {620 $deliv_pref = '', $charge = 0, $discount = 0, $deliv_id = 0) { 621 621 $objDb = new SC_Helper_DB_Ex(); 622 622 … … 659 659 $results['add_point'] = SC_Helper_DB_Ex::sfGetAddPoint($total_point, 660 660 $use_point); 661 if ($objCustomer != "") {661 if ($objCustomer != '') { 662 662 // 誕生日月であった場合 663 663 if ($objCustomer->isBirthMonth()) {
Note: See TracChangeset
for help on using the changeset viewer.