Source for file LC_Page_FrontParts_Bloc_Cart.php
Documentation is available at LC_Page_FrontParts_Bloc_Cart.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2011 LOCKON CO.,LTD. All Rights Reserved.
* http://www.lockon.co.jp/
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
require_once CLASS_REALDIR . 'pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php';
* @author LOCKON CO.,LTD.
* @version $Id:LC_Page_FrontParts_Bloc_Cart.php 15532 2007-08-31 14:39:46Z nanasess $
$masterData = new SC_DB_MasterData_Ex();
$this->arrProductType = $masterData->getMasterData("mtb_product_type"); //商品種類を取得
$objCart = new SC_CartSession_Ex();
$this->isMultiple = $objCart->isMultiple();
$this->hasDownload = $objCart->hasProductType(PRODUCT_TYPE_DOWNLOAD);
* @param SC_CartSession $objCart カートセッション管理クラス
* @return array $arrCartList カートデータ配列
$arrCartKeys = $objCart->getKeys();
foreach ($arrCartKeys as $cart_key) {
$arrCartList = $objCart->getCartList($cart_key);
$arrAllProductID = $objCart->getAllProductID($cart_key);
// 商品が1つ以上入っている場合には商品名称を取得
if (count($arrCartList) > 0){
foreach($arrCartList['productsClass'] as $key => $val){
$arrCartList[$key]['product_name'] = $val['name'];
$products_total += $objCart->getAllProductsTotal($cart_key);
$total_quantity += $objCart->getTotalQuantity($cart_key);
if (!$this->isMultiple && !$this->hasDownload) {
$is_deliv_free = $objCart->isDelivFree($cart_key);
$arrCartList[0]['ProductsTotal'] = $products_total;
$arrCartList[0]['TotalQuantity'] = $total_quantity;
$arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
$arrCartList[0]['free_rule'] = $arrInfo['free_rule'];
$arrCartList[0]['deliv_free'] = 0;
$deliv_free = $arrInfo['free_rule'] - $products_total;
$arrCartList[0]['deliv_free'] = $deliv_free;
Documentation generated on Fri, 24 Feb 2012 14:01:59 +0900 by Seasoft
|