Index: /branches/version-2_5-dev/html/install/sql/insert_data.sql
===================================================================
--- /branches/version-2_5-dev/html/install/sql/insert_data.sql	(revision 18853)
+++ /branches/version-2_5-dev/html/install/sql/insert_data.sql	(revision 18862)
@@ -425,5 +425,5 @@
 INSERT INTO dtb_class_combination (class_combination_id, parent_class_combination_id, classcategory_id, level) VALUES(18, 9, 4, 2);
 
-INSERT INTO dtb_product_status (product_status_id, product_id, creator_id, create_date, update_date, del_flg) VALUES (1, 1, 2, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 2);
+INSERT INTO dtb_product_status (product_status_id, product_id, creator_id, create_date, update_date, del_flg) VALUES (1, 1, 2, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 0);
 
 INSERT INTO dtb_recommend_products (product_id, recommend_product_id, rank, comment, status, creator_id, create_date, update_date) VALUES (2, 1, 4, 'お口直しに。', 0, 2, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
Index: /branches/version-2_5-dev/data/Smarty/templates/default/detail.tpl
===================================================================
--- /branches/version-2_5-dev/data/Smarty/templates/default/detail.tpl	(revision 18833)
+++ /branches/version-2_5-dev/data/Smarty/templates/default/detail.tpl	(revision 18862)
@@ -194,14 +194,12 @@
         <div id="detailrightblock">
             <!--▼商品ステータス-->
-            <!--{if count($arrProduct.product_flag) > 0}-->
+            <!--{assign var=ps value=$productStatus[$smarty.get.product_id]}-->
+            <!--{if count($ps) > 0}-->
                 <ul class="status_icon">
-                    <!--{section name=flg loop=$arrProduct.product_flag|count_characters}-->
-                    <!--{if $arrProduct.product_flag[flg] == "1"}-->
+                    <!--{foreach from=$ps item=status}-->
                     <li>
-                        <!--{assign var=key value="`$smarty.section.flg.iteration`"}-->
-                        <img src="<!--{$TPL_DIR}--><!--{$arrSTATUS_IMAGE[$key]}-->" width="65" height="17" alt="<!--{$arrSTATUS[$key]}-->" id="icon<!--{$key}-->" />
+                        <img src="<!--{$TPL_DIR}--><!--{$arrSTATUS_IMAGE[$status]}-->" width="65" height="17" alt="<!--{$arrSTATUS[$status]}-->" id="icon<!--{$status}-->" />
                     </li>
-                    <!--{/if}-->
-                    <!--{/section}-->
+                    <!--{/foreach}-->
                 </ul>
             <!--{/if}-->
Index: /branches/version-2_5-dev/data/Smarty/templates/default/list.tpl
===================================================================
--- /branches/version-2_5-dev/data/Smarty/templates/default/list.tpl	(revision 18852)
+++ /branches/version-2_5-dev/data/Smarty/templates/default/list.tpl	(revision 18862)
@@ -233,14 +233,11 @@
             <div class="listrightblock">
                 <!--▼商品ステータス-->
-                <!--{if $arrProduct.product_flag|strpos:"1" !== false}-->
+                <!--{if count($productStatus[$id]) > 0}-->
                     <ul class="status_icon">
-                        <!--{section name=flg loop=$arrProduct.product_flag|count_characters}-->
-                            <!--{if $arrProduct.product_flag[flg] == "1"}-->
-                                <li>
-                                    <!--{assign var=key value="`$smarty.section.flg.iteration`"}-->
-                                    <img src="<!--{$TPL_DIR}--><!--{$arrSTATUS_IMAGE[$key]}-->" width="65" height="17" alt="<!--{$arrSTATUS[$key]}-->"/>
-                                </li>
-                            <!--{/if}-->
-                        <!--{/section}-->
+                        <!--{foreach from=$productStatus[$id] item=status}--> 
+                            <li>
+                                <img src="<!--{$TPL_DIR}--><!--{$arrSTATUS_IMAGE[$status]}-->" width="65" height="17" alt="<!--{$arrSTATUS[$status]}-->"/>
+                            </li>
+                        <!--{/foreach}-->
                     </ul>
                 <!--{/if}-->
Index: /branches/version-2_5-dev/data/class/SC_Product.php
===================================================================
--- /branches/version-2_5-dev/data/class/SC_Product.php	(revision 18860)
+++ /branches/version-2_5-dev/data/class/SC_Product.php	(revision 18862)
@@ -421,4 +421,22 @@
         }
         return $productsClass;
+    }
+
+    /**
+     * 商品IDをキーにした, 商品ステータスIDの配列を取得する.
+     *
+     * @param array 商品ID の配列
+     * @return array 商品IDをキーにした商品ステータスIDの配列
+     */
+    function getProductStatus($productIds) {
+        $objQuery =& SC_Query::getSingletonInstance();
+        $productStatus = $objQuery->select("product_id, product_status_id",
+                                           "dtb_product_status",
+                                           'del_flg = 0 AND product_id IN (' . implode(', ', array_pad(array(), count($productIds), '?')) . ')', $productIds);
+        $results = array();
+        foreach ($productStatus as $status) {
+            $results[$status['product_id']][] = $status['product_status_id'];
+        }
+        return $results;
     }
 
Index: /branches/version-2_5-dev/data/class/pages/products/LC_Page_Products_Detail.php
===================================================================
--- /branches/version-2_5-dev/data/class/pages/products/LC_Page_Products_Detail.php	(revision 18833)
+++ /branches/version-2_5-dev/data/class/pages/products/LC_Page_Products_Detail.php	(revision 18862)
@@ -240,4 +240,7 @@
         $this->arrRelativeCat = $objDb->sfGetMultiCatTree($product_id);
 
+        // 商品ステータスを取得
+        $this->productStatus = $objProduct->getProductStatus($product_id);
+
         // 画像ファイル指定がない場合の置換処理
         $this->arrProduct['main_image']
Index: /branches/version-2_5-dev/data/class/pages/products/LC_Page_Products_List.php
===================================================================
--- /branches/version-2_5-dev/data/class/pages/products/LC_Page_Products_List.php	(revision 18852)
+++ /branches/version-2_5-dev/data/class/pages/products/LC_Page_Products_List.php	(revision 18862)
@@ -479,4 +479,7 @@
         $this->tpl_product_type = $objProduct->product_type;
 
+        // 商品ステータスを取得
+        $this->productStatus = $objProduct->getProductStatus($arrProductId);
+
         $productsClassCategories = $objProduct->classCategories;
 
