バージョン選択

フォーラム

メニュー

オンライン状況

45 人のユーザが現在オンラインです。 (33 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 45
もっと...

サイト内検索

質問 > その他 > 横4列画像表示

その他

新規スレッドを追加する

スレッド表示 | 新しいものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
greanpice
投稿日時: 2012/6/12 17:45
対応状況: −−−
長老
登録日: 2011/7/12
居住地:
投稿: 180
横4列画像表示
商品一覧画面から横4列画像を表示させましたが、
下記ソースですと、最後尾のない商品も出力されてしまいます。
たとえば、7件なら残りの1件は表示させないようにすることは可能でしょうか??

<!--{section name=cnt loop=$arrProducts step=4}-->

<div class="item-line"

<!-- ▼1つめの商品 -->

<!--{assign var=id value=$arrProducts[cnt].product_id}-->

<div class="item-box-wrap">



<!--商品写真-->

<div class="item-box-photo">

<a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProducts[cnt].product_id}-->"><!--商品写真--><img src="<!--{$smarty.const.IMAGE_SAVE_URL|sfTrimURL}-->/<!--{$arrProducts[cnt].main_list_image}-->" alt="<!--{$arrProducts[cnt].name|escape}-->" /></a>

</div>



<!--商品名-->

<h3>

<a href=">!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProducts[cnt].product_id}-->"><!--{$arrProducts[cnt].name|escape}--></a>

</h3>



<!--商品価格-->

<div class="item-box-price">

<!--{if $arrProducts[cnt].price02_min == $arrProducts[cnt].price02_max}-->

<!--{$arrProducts[cnt].price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->

<!--{else}-->

<!--{$arrProducts[cnt].price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->〜<!--{$arrProducts[cnt].price02_max|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->

<!--{/if}-->円

</div>



<!--売り切れの場合-->

<!--{if $arrProducts[cnt].stock_max == 0 && $arrProducts[cnt].stock_unlimited_max != 1}-->

<div class="item-box-soldout">

申し訳ございませんが、只今品切れ中です。

</div>

<!--{/if}-->



<!--商品コメント-->

<div class="item-box-comment">

<!--{$arrProducts[cnt].main_list_comment|escape|nl2br}-->

</div>



</div>

<!-- ▲1つめの商品 -->

<!-- ▼2つめの商品 -->

<!--{assign var=cnt4 value=`$smarty.section.cnt.iteration*$smarty.section.cnt.step-3` }-->

<!--{if $arrProducts[$cnt4].product_id}-->

<div class="item-box-wrap">



<!--商品写真-->

<div class="item-box-photo">

<a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProducts[$cnt4].product_id}-->"><img src="<!--{$smarty.const.IMAGE_SAVE_URL|sfTrimURL}-->/<!--{$arrProducts[$cnt4].main_list_image}-->" alt="<!--{$arrProducts[$cnt4].name|escape}-->" /></a>

</div>



<!--商品名-->

<h3>

<a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProducts[$cnt4].product_id}-->"><!--{$arrProducts[$cnt4].name|escape}--></a>

</h3>

<!--商品価格-->

<div class="item-box-price">

<!--{if $arrProducts[$cnt4].price02_min == $arrProducts[$cnt4].price02_max}-->

<!--{$arrProducts[$cnt4].price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->

<!--{else}-->

<!--{$arrProducts[$cnt4].price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->〜<!--{$arrProducts[$cnt4].price02_max|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->

<!--{/if}-->円

</div>



<!--売り切れの場合-->

<!--{if $arrProducts[$cnt4].stock_max == 0 && $arrProducts[$cnt4].stock_unlimited_max != 1}-->

<div class="item-box-soldout">

申し訳ございませんが、只今品切れ中です。

</div>

<!--{/if}-->
<!--商品コメント-->

<div class="item-box-comment">

<!--{$arrProducts[$cnt4].main_list_comment|escape|nl2br}-->

</div>

</div>

<!--{/if}-->

<!-- ▲2つめの商品 -->

<!-- ▼3つめの商品 -->

<!--{assign var=cnt3 value=`$smarty.section.cnt.iteration*$smarty.section.cnt.step-2` }-->

<!--{if $arrProducts[$cnt3].product_id}-->

<div class="item-box-wrap">



<!--商品写真-->

<div class="item-box-photo">

<a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProducts[$cnt3].product_id}-->"><img src="<!--{$smarty.const.IMAGE_SAVE_URL|sfTrimURL}-->/<!--{$arrProducts[$cnt3].main_list_image}-->" alt="<!--{$arrProducts[$cnt3].name|escape}-->" /></a>

</div>
<!--商品名-->

<h3>

<a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProducts[$cnt3].product_id}-->"><!--{$arrProducts[$cnt3].name|escape}--></a>

</h3>



<!--商品価格-->

<div class="item-box-price">

<!--{if $arrProducts[$cnt3].price02_min == $arrProducts[$cnt3].price02_max}-->

<!--{$arrProducts[$cnt3].price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->

<!--{else}-->
<!--{$arrProducts[$cnt3].price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->〜<!--{$arrProducts[$cnt3].price02_max|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->

<!--{/if}-->円

</div>

<!--売り切れの場合-->

<!--{if $arrProducts[$cnt3].stock_max == 0 && $arrProducts[$cnt3].stock_unlimited_max != 1}-->

<div class="item-box-soldout">

申し訳ございませんが、只今品切れ中です。

</div>

<!--{/if}-->

<!--商品コメント-->

<div class="item-box-comment">

<!--{$arrProducts[$cnt3].main_list_comment|escape|nl2br}-->

</div>



</div>

<!--{/if}-->

<!-- ▲3つめの商品 -->

<!-- ▼4つめの商品 -->

<!--{assign var=cnt2 value=`$smarty.section.cnt.iteration*$smarty.section.cnt.step-1` }-->

<!--{if $arrProducts[$cnt2].product_id}-->

<div class="item-box-wrap-end">
<!--商品写真-->

<div class="item-box-photo">

<a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProducts[$cnt2].product_id}-->"><img src="<!--{$smarty.const.IMAGE_SAVE_URL|sfTrimURL}-->/<!--{$arrProducts[$cnt2].main_list_image}-->" alt="<!--{$arrProducts[$cnt2].name|escape}-->" /></a>

</div>
<!--商品名-->

<h3>

<a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProducts[$cnt2].product_id}-->"><!--{$arrProducts[$cnt2].name|escape}--></a>

</h3>
<!--商品価格-->

<div class="item-box-price">

<!--{if $arrProducts[$cnt2].price02_min == $arrProducts[$cnt2].price02_max}-->

<!--{$arrProducts[$cnt2].price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->

<!--{else}-->

<!--{$arrProducts[$cnt2].price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->〜<!--{$arrProducts[$cnt2].price02_max|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->

<!--{/if}-->円

</div>
<!--売り切れの場合-->

<!--{if $arrProducts[$cnt2].stock_max == 0 && $arrProducts[$cnt2].stock_unlimited_max != 1}-->

<div class="item-box-soldout">

申し訳ございませんが、只今品切れ中です。

</div>

<!--{/if}-->

<!--商品コメント-->

<div class="item-box-comment">
<!--{$arrProducts[$cnt2].main_list_comment|escape|nl2br}-->

</div>

</div>

<!--{/if}-->

<!-- ▲4つめの商品 -->

</div>

<!--{/section}-->
DELIGHT
投稿日時: 2012/6/13 12:28
対応状況: −−−
仙人
登録日: 2010/2/3
居住地: 熊本県・九州・長野県・関東甲信越
投稿: 572
Re: 横4列画像表示
いろいろ方法があると思うのですが、
ソースをみたところ各商品タグを出力する前に

<!--{if $arrProducts[cnt].product_id}-->
商品出力部分
<!--{/if}-->

という感じでIDがあったら出力するみたいにしたら簡単だと思いますよ。


----------------
+ DAISY inc. -------------------- +
EC-CUBE構築・カスタマイズサービス
EC・WEB構築などお気軽にご相談ください。

デイジー株式会社
http://daisy.link/

スレッド表示 | 新しいものから 前のトピック | 次のトピック | トップ


 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,883名です
総投稿数は110,000件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2313
5
umebius
2085
6
yuh
1819
7
h_tanaka
1646
8
red
1570
9
mcontact
1295
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.