Changeset 17785 for branches/version-2_4/data/class/helper/SC_Helper_DB.php
- Timestamp:
- 2009/02/17 13:50:52 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_4/data/class/helper/SC_Helper_DB.php
r17766 r17785 294 294 $objPage->tpl_total_pretax = 0; // 費用合計(税込み) 295 295 $objPage->tpl_total_tax = 0; // 消費税合計 296 $objPage->tpl_total_point = 0; // ポイント合計 296 if (USE_POINT === true) { 297 $objPage->tpl_total_point = 0; // ポイント合計 298 } 297 299 298 300 // カート内情報の取得 … … 370 372 } 371 373 // ポイント付与率の登録 372 $objCartSess->setProductValue($arrCart[$i]['id'], 'point_rate', $arrData['point_rate']); 374 if (USE_POINT === true) { 375 $objCartSess->setProductValue($arrCart[$i]['id'], 'point_rate', $arrData['point_rate']); 376 } 373 377 // 商品ごとの合計金額 374 378 $objPage->arrProductsClass[$cnt]['total_pretax'] = $objCartSess->getProductTotal($arrInfo, $arrCart[$i]['id']); … … 387 391 $objPage->tpl_total_tax = $objCartSess->getAllProductsTax($arrInfo); 388 392 // 全商品合計ポイント 389 $objPage->tpl_total_point = $objCartSess->getAllProductsPoint(); 393 if (USE_POINT === true) { 394 $objPage->tpl_total_point = $objCartSess->getAllProductsPoint(); 395 } 390 396 391 397 return $objPage; … … 509 515 $customer_id = $arrRet[0]['customer_id']; 510 516 if($customer_id != "" && $customer_id >= 1) { 511 $arrRet = $objQuery->select("point", "dtb_customer", "customer_id = ?", array($customer_id)); 512 $point = $arrRet[0]['point']; 513 $total_point = $arrRet[0]['point'] - $use_point + $add_point; 517 if (USE_POINT === true) { 518 $arrRet = $objQuery->select("point", "dtb_customer", "customer_id = ?", array($customer_id)); 519 $point = $arrRet[0]['point']; 520 $total_point = $arrRet[0]['point'] - $use_point + $add_point; 521 } else { 522 $total_point = ""; 523 $point = ""; 524 } 514 525 } else { 515 $total_point = "";516 $point = "";526 $total_point = 0; 527 $point = 0; 517 528 } 518 529 return array($point, $total_point); … … 1472 1483 $arrData['payment_total'] = $arrData['total'] - ($arrData['use_point'] * POINT_VALUE); 1473 1484 // 加算ポイントの計算 1474 $arrData['add_point'] = SC_Utils::sfGetAddPoint($objPage->tpl_total_point, $arrData['use_point'], $arrInfo); 1475 1476 if($objCustomer != "") { 1477 // 誕生日月であった場合 1478 if($objCustomer->isBirthMonth()) { 1479 $arrData['birth_point'] = BIRTH_MONTH_POINT; 1480 $arrData['add_point'] += $arrData['birth_point']; 1485 if (USE_POINT === false) { 1486 $arrData['add_point'] = 0; 1487 } else { 1488 $arrData['add_point'] = SC_Utils::sfGetAddPoint($objPage->tpl_total_point, $arrData['use_point'], $arrInfo); 1489 1490 if($objCustomer != "") { 1491 // 誕生日月であった場合 1492 if($objCustomer->isBirthMonth()) { 1493 $arrData['birth_point'] = BIRTH_MONTH_POINT; 1494 $arrData['add_point'] += $arrData['birth_point']; 1495 } 1481 1496 } 1482 1497 }
Note: See TracChangeset
for help on using the changeset viewer.