2010年11月13日

EC-CUBEオススメ 4列にする

投稿者: 管理者

2.4.4にてやっています。

[html]
<!–▼おすすめ情報ここから–>
<!–{if count($arrBestProducts) > 0}–>
<div id="recomendarea">
<h2>
<img src="<!–{$TPL_DIR}–>img/top/osusume.jpg" width="730" height="44" alt="おすすめ情報" />
</h2>
<!–{section name=cnt loop=$arrBestProducts step=4}–>
<div class="recomendblock">

<div class="recomendleft heightLine">
<!–{if $arrBestProducts[cnt].main_list_image != ""}–>
<!–{assign var=image_path value="`$arrBestProducts[cnt].main_list_image`"}–>
<!–{else}–>
<!–{assign var=image_path value="`$smarty.const.NO_IMAGE_DIR`"}–>
<!–{/if}–>

<a href="<!–{$smarty.const.URL_DIR}–>products/detail.php?product_id=<!–{$arrBestProducts[cnt].product_id}–>">
<img src="<!–{$smarty.const.SITE_URL}–>resize_image.php?image=<!–{$image_path|sfRmDupSlash}–>&width=90&height=90" alt="<!–{$arrBestProducts[cnt].name|escape}–>" />
</a>

<h3>
<a href="<!–{$smarty.const.URL_DIR}–>products/detail.php?product_id=<!–{$arrBestProducts[cnt].product_id}–>"><!–{$arrBestProducts[cnt].name|escape}–></a>
</h3>

<!–{assign var=price01 value=`$arrBestProducts[cnt].price01_min`}–>
<!–{assign var=price02 value=`$arrBestProducts[cnt].price02_min`}–>

<p><span class="price_mark"></span><span class="price">¥
<!–{if $price02 == ""}–>
<!–{$price01|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}–>
<!–{else}–>
<!–{$price02|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}–>
<!–{/if}–>
</span>
</p>
<p class="mini"><!–{$arrBestProducts[cnt].comment|escape|nl2br}–></p>
</div>

<div class="recomendleft heightLine">
<!–{assign var=cnt2 value=`$smarty.section.cnt.iteration*$smarty.section.cnt.step-3` }–>
<!–{if $arrBestProducts[$cnt2]|count > 0}–>
<!–{if $arrBestProducts[$cnt2].main_list_image != ""}–>
<!–{assign var=image_path value="`$arrBestProducts[$cnt2].main_list_image`"}–>
<!–{else}–>
<!–{assign var=image_path value="`$smarty.const.NO_IMAGE_DIR`"}–>
<!–{/if}–>

<a href="<!–{$smarty.const.URL_DIR}–>products/detail.php?product_id=<!–{$arrBestProducts[$cnt2].product_id}–>">
<img src="<!–{$smarty.const.SITE_URL}–>resize_image.php?image=<!–{$image_path|sfRmDupSlash}–>&width=90&height=90" alt="<!–{$arrBestProducts[$cnt2].name|escape}–>" />
</a>

<h3>
<a href="<!–{$smarty.const.URL_DIR}–>products/detail.php?product_id=<!–{$arrBestProducts[$cnt2].product_id}–>"><!–{$arrBestProducts[$cnt2].name|escape}–></a>
</h3>

<!–{assign var=price01 value=`$arrBestProducts[$cnt2].price01_min`}–>
<!–{assign var=price02 value=`$arrBestProducts[$cnt2].price02_min`}–>

<p><span class="price_mark"></span><span class="price">¥
<!–{if $price02 == ""}–>
<!–{$price01|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}–>
<!–{else}–>
<!–{$price02|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}–>
<!–{/if}–></span>
</p>

<p class="mini"><!–{$arrBestProducts[$cnt2].comment|escape|nl2br}–></p>
<!–{/if}–>
</div>

<div class="recomendright heightLine">
<!–{assign var=cnt3 value=`$smarty.section.cnt.iteration*$smarty.section.cnt.step-1` }–>
<!–{if $arrBestProducts[$cnt3]|count > 0}–>
<!–{if $arrBestProducts[$cnt3].main_list_image != ""}–>
<!–{assign var=image_path value="`$arrBestProducts[$cnt3].main_list_image`"}–>
<!–{else}–>
<!–{assign var=image_path value="`$smarty.const.NO_IMAGE_DIR`"}–>
<!–{/if}–>

<a href="<!–{$smarty.const.URL_DIR}–>products/detail.php?product_id=<!–{$arrBestProducts[$cnt3].product_id}–>">
<img src="<!–{$smarty.const.SITE_URL}–>resize_image.php?image=<!–{$image_path|sfRmDupSlash}–>&width=90&height=90" alt="<!–{$arrBestProducts[$cnt3].name|escape}–>" />
</a>

<h3>
<a href="<!–{$smarty.const.URL_DIR}–>products/detail.php?product_id=<!–{$arrBestProducts[$cnt3].product_id}–>"><!–{$arrBestProducts[$cnt3].name|escape}–></a>
</h3>

<!–{assign var=price01 value=`$arrBestProducts[$cnt3].price01_min`}–>
<!–{assign var=price02 value=`$arrBestProducts[$cnt3].price02_min`}–>

<p><span class="price_mark"></span><span class="price">¥
<!–{if $price02 == ""}–>
<!–{$price01|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}–>
<!–{else}–>
<!–{$price02|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}–>
<!–{/if}–></span>
</p>

<p class="mini"><!–{$arrBestProducts[$cnt3].comment|escape|nl2br}–></p>
<!–{/if}–>
</div>

<div class="recomendright heightLine">
<!–{assign var=cnt4 value=`$smarty.section.cnt.iteration*$smarty.section.cnt.step-2` }–>
<!–{if $arrBestProducts[$cnt4]|count > 0}–>
<!–{if $arrBestProducts[$cnt4].main_list_image != ""}–>
<!–{assign var=image_path value="`$arrBestProducts[$cnt4].main_list_image`"}–>
<!–{else}–>
<!–{assign var=image_path value="`$smarty.const.NO_IMAGE_DIR`"}–>
<!–{/if}–>

<a href="<!–{$smarty.const.URL_DIR}–>products/detail.php?product_id=<!–{$arrBestProducts[$cnt4].product_id}–>">
<img src="<!–{$smarty.const.SITE_URL}–>resize_image.php?image=<!–{$image_path|sfRmDupSlash}–>&width=90&height=90" alt="<!–{$arrBestProducts[$cnt4].name|escape}–>" />
</a>

<h3>
<a href="<!–{$smarty.const.URL_DIR}–>products/detail.php?product_id=<!–{$arrBestProducts[$cnt4].product_id}–>"><!–{$arrBestProducts[$cnt4].name|escape}–></a>
</h3>

<!–{assign var=price01 value=`$arrBestProducts[$cnt4].price01_min`}–>
<!–{assign var=price02 value=`$arrBestProducts[$cnt4].price02_min`}–>

<p><span class="price_mark"></span><span class="price">¥
<!–{if $price02 == ""}–>
<!–{$price01|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}–>
<!–{else}–>
<!–{$price02|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}–>
<!–{/if}–></span>
</p>

<p class="mini"><!–{$arrBestProducts[$cnt4].comment|escape|nl2br}–></p>
<!–{/if}–>
</div>

</div>
<!–{/section}–>
</div>
<!–{/if}–>
<!–▲おすすめ情報ここまで–>
[/html]