Changeset 21581 for branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.php
- Timestamp:
- 2012/03/04 03:57:33 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.php
r21481 r21581 67 67 $this->isMultiple = $objCart->isMultiple(); 68 68 $this->hasDownload = $objCart->hasProductType(PRODUCT_TYPE_DOWNLOAD); 69 $this->arrCartList = $this->lfGetCartData($objCart); 69 // 旧仕様との互換のため、不自然なセットとなっている 70 $this->arrCartList = array(0 => $this->lfGetCartData($objCart)); 70 71 } 71 72 … … 83 84 * 84 85 * @param SC_CartSession $objCart カートセッション管理クラス 85 * @return array $arrCartListカートデータ配列86 * @return array カートデータ配列 86 87 */ 87 88 function lfGetCartData(&$objCart) { 88 89 $arrCartKeys = $objCart->getKeys(); 89 90 foreach ($arrCartKeys as $cart_key) { 90 // カート情報を取得91 $arrCartList = $objCart->getCartList($cart_key);92 91 // カート内の商品ID一覧を取得 93 92 $arrAllProductID = $objCart->getAllProductID($cart_key); 94 // 商品が1つ以上入っている場合には商品名称を取得95 if (count($arrCartList) > 0) {96 97 foreach ($arrCartList['productsClass'] as $key => $val) {98 $arrCartList[$key]['product_name'] = $val['name'];99 }100 }101 93 // 購入金額合計 102 94 $products_total += $objCart->getAllProductsTotal($cart_key); … … 110 102 } 111 103 112 $arrCartList[0]['ProductsTotal'] = $products_total; 113 $arrCartList[0]['TotalQuantity'] = $total_quantity; 104 $arrCartList = array(); 105 106 $arrCartList['ProductsTotal'] = $products_total; 107 $arrCartList['TotalQuantity'] = $total_quantity; 114 108 115 109 // 店舗情報の取得 116 110 $arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); 117 $arrCartList[ 0]['free_rule'] = $arrInfo['free_rule'];111 $arrCartList['free_rule'] = $arrInfo['free_rule']; 118 112 119 113 // 送料無料までの金額 120 114 if ($is_deliv_free) { 121 $arrCartList[ 0]['deliv_free'] = 0;115 $arrCartList['deliv_free'] = 0; 122 116 } else { 123 117 $deliv_free = $arrInfo['free_rule'] - $products_total; 124 $arrCartList[ 0]['deliv_free'] = $deliv_free;118 $arrCartList['deliv_free'] = $deliv_free; 125 119 } 126 120
Note: See TracChangeset
for help on using the changeset viewer.