質問 > フロント機能 > EC-CUBEのおすすめ商品を3列に増やしたのですが… |
フロント機能
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | 下へ |
投稿者 | スレッド |
---|---|
konikoni |
投稿日時: 2011/6/24 20:55
対応状況: −−−
|
新米 登録日: 2011/6/9 居住地: 投稿: 10 |
EC-CUBEのおすすめ商品を3列に増やしたのですが… 3列に増やしてみたのですが、3列目の商品の価格が0になってしまいます。過去のスレッドなども確認してみたのですが、解決できず…。
図々しいとは思いますが、もしよろしければ教えていただければと思います。 <!--{if count($arrBestProducts) > 0}--> <div class="bloc_outer clearfix"> <div id="recomend_area"> <h2><img src="<!--{$TPL_URLPATH}-->img/title/tit_bloc_recommend.jpg" alt="*" class="title_icon" /></h2> <!--{section name=cnt loop=$arrBestProducts step=3}--> <div class="bloc_body clearfix"> <div class="recomendleft clearfix"> <div class="productImage"> <a href="<!--{$smarty.const.P_DETAIL_URLPATH}--><!--{$arrBestProducts[cnt].product_id|u}-->"> <img src="<!--{$smarty.const.ROOT_URLPATH}-->resize_image.php?image=<!--{$arrBestProducts[cnt].main_list_image|sfNoImageMainList|h}-->&width=150&height=150" alt="<!--{$arrBestProducts[cnt].name|h}-->" /></a> </div> <div class="productContents"> <h3> <a href="<!--{$smarty.const.P_DETAIL_URLPATH}--><!--{$arrBestProducts[cnt].product_id|u}-->"><!--{$arrBestProducts[cnt].name|h}--></a> </h3> <!--{assign var=price01 value=`$arrBestProducts[cnt].price01_min`}--> <!--{assign var=price02 value=`$arrBestProducts[cnt].price02_min`}--> <p class="sale_price">価格(税込): <span class="price"><!--{$price02|sfCalcIncTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}--> 円</span> </p> <p class="mini comment"><!--{$arrBestProducts[cnt].comment|h|nl2br}--></p> </div> </div> <div class="recomendleft clearfix"> <div class="productImage"> <!--{assign var=cnt2 value=`$smarty.section.cnt.iteration*$smarty.section.cnt.step-2`}--> <!--{if $arrBestProducts[$cnt2]|count > 0}--> <a href="<!--{$smarty.const.P_DETAIL_URLPATH}--><!--{$arrBestProducts[$cnt2].product_id|u}-->"> <img src="<!--{$smarty.const.ROOT_URLPATH}-->resize_image.php?image=<!--{$arrBestProducts[$cnt2].main_list_image|sfNoImageMainList|h}-->&width=150&height=150" alt="<!--{$arrBestProducts[$cnt2].name|h}-->" /></a> </div> <div class="productContents"> <h3> <a href="<!--{$smarty.const.P_DETAIL_URLPATH}--><!--{$arrBestProducts[$cnt2].product_id|u}-->"><!--{$arrBestProducts[$cnt2].name|h}--></a> </h3> <!--{assign var=price01 value=`$arrBestProducts[$cnt2].price01_min`}--> <!--{assign var=price02 value=`$arrBestProducts[$cnt2].price02_min`}--> <p class="sale_price">価格(税込): <span class="price"><!--{$price02|sfCalcIncTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}--> 円</span> </p> <p class="mini comment"><!--{$arrBestProducts[$cnt2].comment|h|nl2br}--></p> <!--{/if}--> </div> </div> <div class="recomendright clearfix"> <div class="productImage"> <!--{assign var=cnt2 value=`$smarty.section.cnt.iteration*$smarty.section.cnt.step-1`}--> <!--{if $arrBestProducts[$cnt2]|count > 0}--> <a href="<!--{$smarty.const.P_DETAIL_URLPATH}--><!--{$arrBestProducts[$cnt2].product_id|u}-->"> <img src="<!--{$smarty.const.ROOT_URLPATH}-->resize_image.php?image=<!--{$arrBestProducts[$cnt2].main_list_image|sfNoImageMainList|h}-->&width=150&height=150" alt="<!--{$arrBestProducts[$cnt2].name|h}-->" /></a> </div> <div class="productContents"> <h3> <a href="<!--{$smarty.const.P_DETAIL_URLPATH}--><!--{$arrBestProducts[$cnt2].product_id|u}-->"><!--{$arrBestProducts[$cnt2].name|h}--></a> </h3> <!--{assign var=price01 value=`$arrBestProducts[$cnt3].price01_min`}--> <!--{assign var=price02 value=`$arrBestProducts[$cnt3].price02_min`}--> <p class="sale_price">価格(税込): <span class="price"><!--{$price02|sfCalcIncTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}--> 円</span> </p> <p class="mini comment"><!--{$arrBestProducts[$cnt2].comment|h|nl2br}--></p> <!--{/if}--> </div> </div> </div> <!--{/section}--> </div> </div> <!--{/if}--> |
fukap |
投稿日時: 2011/6/24 21:21
対応状況: −−−
|
仙人 登録日: 2009/7/7 居住地: 滋賀県 投稿: 907 |
Re: EC-CUBEのおすすめ商品を3列に増やしたのですが… 2列目のカウンタを cnt2 、3列目のカウンタを cnt3 と定義するなら、
大雑把なコードの構造は以下のようになります。 <!--{section name=cnt loop=$arrBestProducts step=3}--> この中では cnt を使う <!--{assign var=cnt2 value=`$smarty.section.cnt.iteration*$smarty.section.cnt.step-2`}--> この中では $cnt2 を使う <!--{assign var=cnt3 value=`$smarty.section.cnt.iteration*$smarty.section.cnt.step-1`}--> この中では $cnt3 を使う <!--{/section}--> ですので、3列目のカウンタを定義するコードは以下のようにすると良いかと。
そして、3列目の商品情報を出力するコード内で、$cnt2 を $cnt3 にするとうまくいくかと思います。 |
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | トップ |