Ignore:
Timestamp:
2012/10/21 00:23:56 (12 years ago)
Author:
Seasoft
Message:

#1952 (モバイルサイト カートイン時に商品規格2の選択が正しく認識されない)
#1953 (LC_Page_Products_Detail#doMobileSelectItem product_class_id のエラーがセットされている)
#1905 (typo修正・ソース整形・ソースコメントの改善)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/pages/products/LC_Page_Products_Detail.php

    r21988 r22055  
    609609     */ 
    610610    function doMobileSelectItem() { 
    611         $this->arrErr = $this->lfCheckError($this->mode,$this->objFormParam,$this->tpl_classcat_find1,$this->tpl_classcat_find2); 
     611        $objProduct = new SC_Product_Ex(); 
     612 
     613        $this->arrErr = $this->lfCheckError($this->mode, $this->objFormParam, $this->tpl_classcat_find1, $this->tpl_classcat_find2); 
     614 
     615        // この段階では、商品規格ID・数量の入力チェックエラーを出させない。 
     616        // FIXME: エラーチェックの定義で mode で定義を分岐する方が良いように感じる 
     617        unset($this->arrErr['product_class_id']); 
     618        unset($this->arrErr['quantity']); 
    612619 
    613620        // 規格2が設定されていて、エラーを検出した場合 
    614         if ($this->tpl_classcat_find2 and $this->arrErr['classcategory_id2']) { 
     621        if ($this->tpl_classcat_find2 and !empty($this->arrErr)) { 
    615622            // templateの変更 
    616623            $this->tpl_mainpage = 'products/select_find2.tpl'; 
    617             break; 
    618         } 
     624            return; 
     625        } 
     626 
     627        $product_id = $this->objFormParam->getValue('product_id'); 
    619628 
    620629        $value1 = $this->objFormParam->getValue('classcategory_id1'); 
     630        if (strlen($value1) === 0) { 
     631            $value1 = '__unselected'; 
     632        } 
    621633 
    622634        // 規格2が設定されている場合. 
     
    627639        } 
    628640 
    629         if (strlen($value1) === 0) { 
    630             $value1 = '__unselected'; 
    631         } 
    632  
     641        $objProduct->setProductsClassByProductIds(array($product_id)); 
    633642        $this->tpl_product_class_id = $objProduct->classCategories[$product_id][$value1][$value2]['product_class_id']; 
    634  
    635         // この段階では、数量の入力チェックエラーを出させない。 
    636         unset($this->arrErr['quantity']); 
    637643 
    638644        // 数量の入力を行う 
Note: See TracChangeset for help on using the changeset viewer.