Changeset 21386


Ignore:
Timestamp:
2012/01/03 09:21:51 (9 years ago)
Author:
Seasoft
Message:

#1591 (商品登録CSVでカテゴリを指定せず登録すると、商品検索で抽出されない)

Location:
branches/version-2_11-dev/data/class
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/data/class/SC_Product.php

    r21352 r21386  
    7474    function findProductIdsOrder(&$objQuery, $arrVal = array()) { 
    7575        $table = <<< __EOS__ 
    76                  dtb_products AS alldtl 
    77             JOIN dtb_products_class AS T1 
    78               ON alldtl.product_id = T1.product_id 
    79             JOIN dtb_product_categories AS T2 
    80               ON alldtl.product_id = T2.product_id 
    81             JOIN dtb_category 
    82               ON T2.category_id = dtb_category.category_id 
     76            dtb_products AS alldtl 
     77            LEFT JOIN dtb_products_class 
     78                ON alldtl.product_id = dtb_products_class.product_id 
     79            LEFT JOIN dtb_product_categories 
     80                ON alldtl.product_id = dtb_product_categories.product_id 
    8381__EOS__; 
    8482        $objQuery->setGroupBy('alldtl.product_id'); 
     
    119117    function findProductCount(&$objQuery, $arrVal = array()) { 
    120118        $table = <<< __EOS__ 
    121                  dtb_products AS alldtl 
    122             JOIN dtb_product_categories AS T2 
    123               ON alldtl.product_id = T2.product_id 
    124             JOIN dtb_category 
    125               ON T2.category_id = dtb_category.category_id 
     119            dtb_products AS alldtl 
     120            LEFT JOIN dtb_products_class 
     121                ON alldtl.product_id = dtb_products_class.product_id 
     122            LEFT JOIN dtb_product_categories 
     123                ON alldtl.product_id = dtb_product_categories.product_id 
    126124__EOS__; 
    127125        $objQuery->setGroupBy('alldtl.product_id'); 
  • branches/version-2_11-dev/data/class/pages/products/LC_Page_Products_List.php

    r21327 r21386  
    425425 
    426426        if (strlen($searchCondition["where_category"]) >= 1) { 
    427             $searchCondition['where'] .= " AND T2.".$searchCondition["where_category"]; 
     427            $searchCondition['where'] .= " AND dtb_product_categories.".$searchCondition["where_category"]; 
    428428            $searchCondition['arrval'] = array_merge($searchCondition['arrval'], $searchCondition['arrvalCategory']); 
    429429        } 
Note: See TracChangeset for help on using the changeset viewer.