Changeset 21508 for branches/version-2_12-dev
- Timestamp:
- 2012/02/15 12:48:16 (12 years ago)
- Location:
- branches/version-2_12-dev/data
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/Smarty/templates/default/rss/products.tpl
r20764 r21508 27 27 <description><!--{$arrSiteInfo.message|sfMbConvertEncoding:$encode}--></description> 28 28 <language>ja</language> 29 <!--{ section name=cnt loop=$arrProduct}-->29 <!--{foreach from=$arrProducts item=arrProduct}--> 30 30 <item> 31 <title><!--{$arrProduct [cnt].name|h|sfMbConvertEncoding:$encode}--></title>32 <link><!--{$smarty.const.HTTP_URL}-->products/detail.php?product_id=<!--{$arrProduct [cnt].product_id}--></link>31 <title><!--{$arrProduct.name|h|sfMbConvertEncoding:$encode}--></title> 32 <link><!--{$smarty.const.HTTP_URL}-->products/detail.php?product_id=<!--{$arrProduct.product_id}--></link> 33 33 <description><![CDATA[ 34 34 <div class="hproduct"> 35 <a href="<!--{$smarty.const.HTTP_URL}-->products/detail.php?product_id=<!--{$arrProduct [cnt].product_id}-->" rel="product">36 <img src="<!--{$arrProduct [cnt].main_list_image}-->" alt="<!--{$arrProduct[cnt].product_name|h|sfMbConvertEncoding:$encode}-->" class="product-thumb" />35 <a href="<!--{$smarty.const.HTTP_URL}-->products/detail.php?product_id=<!--{$arrProduct.product_id}-->" rel="product"> 36 <img src="<!--{$arrProduct.main_list_image}-->" alt="<!--{$arrProduct.product_name|h|sfMbConvertEncoding:$encode}-->" class="product-thumb" /> 37 37 </a> 38 <div class="product-title"><a href="<!--{$smarty.const.HTTP_URL}-->products/detail.php?product_id=<!--{$arrProduct [cnt].product_id}-->" rel="product"><!--{$arrProduct[cnt].product_name|h|sfMbConvertEncoding:$encode}--></a></div>39 商品コード:<!--{$arrProduct [cnt].product_code_max|h|sfMbConvertEncoding:$encode}-->38 <div class="product-title"><a href="<!--{$smarty.const.HTTP_URL}-->products/detail.php?product_id=<!--{$arrProduct.product_id}-->" rel="product"><!--{$arrProduct.product_name|h|sfMbConvertEncoding:$encode}--></a></div> 39 商品コード:<!--{$arrProduct.product_code_max|h|sfMbConvertEncoding:$encode}--> 40 40 <div><!--{$smarty.const.SALE_PRICE_TITLE}-->: 41 41 <span class="price"> 42 <!--{if $arrProduct [cnt].price02_min == $arrProduct[cnt].price02_max}-->43 <!--{$arrProduct [cnt].price02_min|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->42 <!--{if $arrProduct.price02_min == $arrProduct.price02_max}--> 43 <!--{$arrProduct.price02_min|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}--> 44 44 <!--{else}--> 45 <!--{$arrProduct [cnt].price02_min|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->〜<!--{$arrProduct[cnt].price02_max|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->45 <!--{$arrProduct.price02_min|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->〜<!--{$arrProduct.price02_max|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}--> 46 46 <!--{/if}-->円</span> 47 47 </div> 48 48 <div class="description"> 49 <!--{$arrProduct [cnt].main_list_comment|h|sfMbConvertEncoding:$encode|nl2br}-->49 <!--{$arrProduct.main_list_comment|h|sfMbConvertEncoding:$encode|nl2br}--> 50 50 </div> 51 51 </div> 52 52 ]]></description> 53 <pubDate><!--{$arrProduct [cnt].update_date|date_format:"%Y-%m-%dT%T+09:00"}--></pubDate>53 <pubDate><!--{$arrProduct.update_date|date_format:"%Y-%m-%dT%T+09:00"}--></pubDate> 54 54 </item> 55 <!--{/ section}-->55 <!--{/foreach}--> 56 56 </channel> 57 57 </rss > -
branches/version-2_12-dev/data/class/pages/rss/LC_Page_Rss_Products.php
r21479 r21508 80 80 switch ($mode) { 81 81 case 'all': 82 $arrProduct = $this->lfGetProductsDetailData($mode, $product_id);82 $arrProducts = $this->lfGetProductsDetailData($mode, $product_id); 83 83 break; 84 84 case 'list': 85 85 if ($product_id != '' && is_numeric($product_id)) { 86 $arrProduct = $this->lfGetProductsDetailData($mode, $product_id);87 } else { 88 $arrProduct = $this->lfGetProductsListData();86 $arrProducts = $this->lfGetProductsDetailData($mode, $product_id); 87 } else { 88 $arrProducts = $this->lfGetProductsListData(); 89 89 } 90 90 break; 91 91 default: 92 92 if ($product_id != '' && is_numeric($product_id)) { 93 $arrProduct = $this->lfGetProductsDetailData($mode, $product_id);94 } else { 95 $arrProduct = $this->lfGetProductsAllData();93 $arrProducts = $this->lfGetProductsDetailData($mode, $product_id); 94 } else { 95 $arrProducts = $this->lfGetProductsAllData(); 96 96 } 97 97 break; … … 99 99 100 100 // 商品情報をセット 101 $this->arrProduct = $arrProduct; 102 $this->arrProductKeys = $this->lfGetProductKeys($arrProduct); 101 $this->arrProducts = $arrProducts; 102 // 従来互換 (for 2.11) 103 $this->arrProduct = &$this->arrProducts; 103 104 104 105 //セットしたデータをテンプレートファイルに出力 … … 251 252 $arrProductLsit = $objProduct->lists($objQuery); 252 253 } else { 253 $arrProductLsit = $objProduct->getListByProductIds($objQuery, $product_id);254 $arrProductLsit = $objProduct->getListByProductIds($objQuery, array($product_id)); 254 255 } 255 256 … … 286 287 function lfGetProductsAllclass(&$objQuery) { 287 288 // --- 商品一覧の取得 289 $objQuery->setWhere('del_flg = 0 AND status = 1'); 288 290 $objQuery->setOrder('product_id'); 289 291 $objProduct = new SC_Product_Ex(); … … 312 314 return $arrProduct; 313 315 } 314 315 /**316 * lfGetProductKeys.317 *318 * @param array $arrProduct 商品データ配列319 * @return array $arrProductKeys 商品情報のkey配列を返す320 */321 function lfGetProductKeys($arrProduct) {322 $arrProductKeys = array();323 $arrProduct = SC_Utils_Ex::sfSwapArray($arrProduct);324 if (is_array($arrProduct)) {325 $arrProductKeys = array_keys($arrProduct);326 }327 return $arrProductKeys;328 }329 330 316 }
Note: See TracChangeset
for help on using the changeset viewer.