Changeset 20877
- Timestamp:
- 2011/04/21 11:52:40 (13 years ago)
- bzr:base-revision:
- ohkouchi@loop-az.jp-20110421012628-mb15vfnb88s230b0
- bzr:committer:
- Kentaro Ohkouchi <ohkouchi@loop-az.jp>
- bzr:file-ids:
data/class/SC_CartSession.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_CartSession.php
data/class/SC_Product.php 18277@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcomu-ver2%2Fdata%2Fclass%2FSC_Product.php- bzr:mapping-version:
- v4
- bzr:merge:
ohkouchi@loop-az.jp-20110421025206-690rqlkhnjhaw3qp- bzr:repository-uuid:
- 1e3b908f-19a9-db11-a64c-001125224ba8
- bzr:revision-id:
- ohkouchi@loop-az.jp-20110421025237-8ptnnm38grhmet7a
- bzr:revno:
- 3588
- bzr:revprop:branch-nick:
- branches/version-2_11-dev
- bzr:root:
- branches/version-2_11-dev
- bzr:text-revisions:
data/class/SC_CartSession.php ohkouchi@loop-az.jp-20110421025206-690rqlkhnjhaw3qp
data/class/SC_Product.php ohkouchi@loop-az.jp-20110421025206-690rqlkhnjhaw3qp- bzr:timestamp:
- 2011-04-21 11:52:37.161000013 +0900
- bzr:user-agent:
- bzr2.2.1+bzr-svn1.0.4
- svn:original-date:
- 2011-04-21T02:52:37.161000Z
- Location:
- branches/version-2_11-dev/data/class
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/data/class/SC_CartSession.php
r20849 r20877 22 22 */ 23 23 24 /* カートセッション管理クラス */ 24 /** 25 * カートセッション管理クラス 26 * 27 * @author LOCKON CO.,LTD. 28 * @version $Id$ 29 */ 25 30 class SC_CartSession { 26 31 /** ユニークIDを指定する. */ … … 290 295 } 291 296 297 /** 298 * 商品種別ごとにカート内商品の一覧を取得する. 299 * 300 * @param integer $productTypeId 商品種別ID 301 * @return array カート内商品一覧の配列 302 */ 292 303 function getCartList($productTypeId) { 293 304 $objProduct = new SC_Product_Ex(); … … 298 309 && $this->cartSession[$productTypeId][$i]['cart_no'] != "") { 299 310 300 if (SC_Utils_Ex::isBlank($this->cartSession[$productTypeId][$i]['productsClass'])) {301 302 311 // 商品情報は常に取得 312 $this->cartSession[$productTypeId][$i]['productsClass'] =& 313 $objProduct->getDetailAndProductsClass( 303 314 $this->cartSession[$productTypeId][$i]['id']); 304 }305 315 306 316 $price = $this->cartSession[$productTypeId][$i]['productsClass']['price02']; … … 343 353 344 354 // カート内にある商品IDを全て取得する 355 /** 356 * @deprected getAllProductClassID を使用して下さい 357 */ 345 358 function getAllProductID($productTypeId) { 346 359 $max = $this->getMax($productTypeId); … … 369 382 } 370 383 384 /** 385 * 商品種別ID を指定して, カート内の商品をすべて削除する. 386 * 387 * @param integer $productTypeId 商品種別ID 388 * @return void 389 */ 371 390 function delAllProducts($productTypeId) { 372 391 $max = $this->getMax($productTypeId); … … 402 421 } 403 422 423 /** 424 * カート番号と商品種別IDを指定して, 数量を取得する. 425 * 426 * @param integer $cart_no カート番号 427 * @param integer $productTypeId 商品種別ID 428 * @return integer 該当商品規格の数量 429 */ 404 430 function getQuantity($cart_no, $productTypeId) { 405 431 $max = $this->getMax($productTypeId); … … 411 437 } 412 438 439 /** 440 * カート番号と商品種別IDを指定して, 数量を設定する. 441 * 442 * @param integer $quantity 設定する数量 443 * @param integer $cart_no カート番号 444 * @param integer $productTypeId 商品種別ID 445 * @retrun void 446 */ 413 447 function setQuantity($quantity, $cart_no, $productTypeId) { 414 448 $max = $this->getMax($productTypeId); … … 420 454 } 421 455 456 /** 457 * カート番号と商品種別IDを指定して, 商品規格IDを取得する. 458 * 459 * @param integer $cart_no カート番号 460 * @param integer $productTypeId 商品種別ID 461 * @return integer 商品規格ID 462 */ 422 463 function getProductClassId($cart_no, $productTypeId) { 423 464 for ($i = 0; $i <= $max; $i++) { … … 526 567 * - tax: 税額 527 568 * - subtotal: カート内商品の小計 528 * - deliv_fee: カート内商品の合計送料 FIXME569 * - deliv_fee: カート内商品の合計送料 529 570 * - total: 合計金額 530 571 * - payment_total: お支払い合計 531 572 * - add_point: 加算ポイント 532 *533 * TODO ダウンロード商品のみの場合の送料を検討する534 * TODO 使用ポイント, 配送都道府県, 支払い方法, 手数料の扱いを検討535 573 * 536 574 * @param integer $productTypeId 商品種別ID … … 557 595 $cartItems = $this->getCartList($productTypeId); 558 596 foreach ($cartItems as $item) { 559 $results['deliv_fee'] += $item[' deliv_fee'] * $item['quantity'];597 $results['deliv_fee'] += $item['productsClass']['deliv_fee'] * $item['quantity']; 560 598 } 561 599 } … … 600 638 } 601 639 640 /** 641 * カートが保持するキー(商品種別ID)を配列で返す. 642 * 643 * @return array 商品種別IDの配列 644 */ 602 645 function getKeys() { 603 646 $keys = array_keys($this->cartSession); … … 612 655 } 613 656 657 /** 658 * カートに設定された現在のキー(商品種別ID)を登録する. 659 * 660 * @param integer $key 商品種別ID 661 * @return void 662 */ 614 663 function registerKey($key) { 615 664 $_SESSION['cartKey'] = $key; 616 665 } 617 666 667 /** 668 * カートに設定された現在のキー(商品種別ID)を削除する. 669 * 670 * @return void 671 */ 618 672 function unsetKey() { 619 673 unset($_SESSION['cartKey']); 620 674 } 621 675 676 /** 677 * カートに設定された現在のキー(商品種別ID)を取得する. 678 * 679 * @return integer 商品種別ID 680 */ 622 681 function getKey() { 623 682 return $_SESSION['cartKey']; -
branches/version-2_11-dev/data/class/SC_Product.php
r20790 r20877 615 615 } 616 616 /* 617 * point_rate は商品規格(dtb_products_class)ごとに保持しているが,617 * point_rate, deliv_fee は商品規格(dtb_products_class)ごとに保持しているが, 618 618 * 商品(dtb_products)ごとの設定なので MAX のみを取得する. 619 619 */ … … 676 676 T4.stock_unlimited_max, 677 677 T4.point_rate, 678 T4.deliv_fee, 678 679 T4.class_count 679 680 FROM dtb_products … … 691 692 MAX(stock_unlimited) AS stock_unlimited_max, 692 693 MAX(point_rate) AS point_rate, 694 MAX(deliv_fee) AS deliv_fee, 693 695 COUNT(*) as class_count 694 696 FROM dtb_products_class
Note: See TracChangeset
for help on using the changeset viewer.