Changeset 20975


Ignore:
Timestamp:
2011/06/13 04:00:21 (13 years ago)
Author:
Seasoft
Message:

#1322 (単価の表示が永続化される変数と異なる)
#1294 (ソースを読みやすくする)

  • リファレンスにもう1階層押しこむ
Location:
branches/version-2_11-dev/data
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/data/Smarty/templates/default/shopping/multiple.tpl

    r20764 r20975  
    8181                                <!--{$arrForm.class_name2.value[$index]|h}-->:<!--{$arrForm.classcategory_name2.value[$index]|h}--><br /> 
    8282                            <!--{/if}--> 
    83                             <!--{$arrForm.price02.value[$index]|sfCalcIncTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}-->円 
     83                            <!--{$arrForm.price.value[$index]|sfCalcIncTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}-->円 
    8484                        </td> 
    8585                        <td> 
     
    108108                            <!--{assign var=key value="main_list_image"}--> 
    109109                            <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]}-->" /> 
    110                             <!--{assign var=key value="price02"}--> 
     110                            <!--{assign var=key value="price"}--> 
    111111                            <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]}-->" /> 
    112112                            <!--{assign var=key value="shipping"}--> 
  • branches/version-2_11-dev/data/class/helper/SC_Helper_Purchase.php

    r20971 r20975  
    312312    function setShipmentItemTemp($shipping_id, $product_class_id, $quantity) { 
    313313        // 配列が長くなるので, リファレンスを使用する 
    314         $arrItems =& $_SESSION['shipping'][$shipping_id]['shipment_item']; 
    315  
    316         $arrItems[$product_class_id]['shipping_id'] = $shipping_id; 
    317         $arrItems[$product_class_id]['product_class_id'] = $product_class_id; 
    318         $arrItems[$product_class_id]['quantity'] = $quantity; 
     314        $arrItems =& $_SESSION['shipping'][$shipping_id]['shipment_item'][$product_class_id]; 
     315 
     316        $arrItems['shipping_id'] = $shipping_id; 
     317        $arrItems['product_class_id'] = $product_class_id; 
     318        $arrItems['quantity'] = $quantity; 
    319319 
    320320        $objProduct = new SC_Product_Ex(); 
    321         if (empty($arrItems[$product_class_id]['productsClass'])) { 
     321 
     322        // カート情報から読みこめば済むと思うが、一旦保留。むしろ、カート情報も含め、セッション情報を縮小すべきかもしれない。 
     323        /* 
     324        $objCartSession = new SC_CartSession_Ex(); 
     325        $cartKey = $objCartSession->getKey(); 
     326        // 詳細情報を取得 
     327        $cartItems = $objCartSession->getCartList($cartKey); 
     328        */ 
     329 
     330        if (empty($arrItems['productsClass'])) { 
    322331            $product =& $objProduct->getDetailAndProductsClass($product_class_id); 
    323             $arrItems[$product_class_id]['productsClass'] = $product; 
    324         } 
    325         $incTax = SC_Helper_DB_Ex::sfCalcIncTax($arrItems[$product_class_id]['productsClass']['price02']); 
    326         $arrItems[$product_class_id]['total_inctax'] = $incTax * $arrItems[$product_class_id]['quantity']; 
     332            $arrItems['productsClass'] = $product; 
     333        } 
     334        $arrItems['price'] = $arrItems['productsClass']['price02']; 
     335        $inctax = SC_Helper_DB_Ex::sfCalcIncTax($arrItems['price']); 
     336        $arrItems['total_inctax'] = $inctax * $arrItems['quantity']; 
    327337    } 
    328338 
     
    700710 
    701711            $price = SC_Utils_Ex::isBlank($arrValues['price']) 
    702                 ? $d['price02'] 
     712                ? $d['price'] 
    703713                : $arrValues['price']; 
    704714 
  • branches/version-2_11-dev/data/class/pages/shopping/LC_Page_Shopping_Multiple.php

    r20971 r20975  
    131131        $objFormParam->addParam("メイン画像", "main_image"); 
    132132        $objFormParam->addParam("メイン一覧画像", "main_list_image"); 
    133         $objFormParam->addParam("販売価格", "price02"); 
     133        $objFormParam->addParam("販売価格", "price"); 
    134134        $objFormParam->addParam("数量", 'quantity', INT_LEN, 'n', array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"), 1); 
    135135        $objFormParam->addParam("配送先住所", 'shipping', INT_LEN, 'n', array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK")); 
     
    153153            $quantity = (int) $cartLists[$key]['quantity']; 
    154154            for ($i = 0; $i < $quantity; $i++) { 
    155                 foreach ($arrProductsClass as $key => $val) { 
    156                     $arrItems[$key][$index] = $val; 
     155                foreach ($arrProductsClass as $key2 => $val) { 
     156                    $arrItems[$key2][$index] = $val; 
    157157                } 
    158158                $arrItems['quantity'][$index] = 1; 
     159                $arrItems['price'][$index] = $cartLists[$key]['price']; 
    159160                $index++; 
    160161            } 
Note: See TracChangeset for help on using the changeset viewer.