Hallo zusammen,
Ich bastle gerade an usnerem Shop und würde gern Firmwares für diverse Artikel in unserem Shop anbinden.
Dies passiert über direkte Links die in den Artikel Daten hinterlegt werden.
Soweit funktioniert auch alles, das einizige Problem das Ich habe ist das beim @count mir immer +1 gerechnet wird, da ja der Hersteller in den Links ebenfalls dazuberechnet wird.
Hätte hier jemand eine Idee wie ich dieses +1 (vom Hersteller) subtrahieren könnte.
custom_tab4.tpl
{namespace name="frontend/detail/tabs/custom_tabs"}
<div class="buttons--off-canvas">
<a class="close--off-canvas" href="#">
<i class="icon--arrow-left"></i>
Zurück
</a>
</div>
{* Firmware *}
{block name='frontend_detail_description_firmware'}
{if $sArticle.sLinks|@count}
{* Firmware title *}
{block name='frontend_detail_description_firmware_title'}
<div class="content--title">
{s name="DetailDescriptionHeaderFirmware"}{/s}
</div>
{/block}
{* Firmware list *}
{block name='frontend_detail_description_firmware_content'}
<ul class="content--list list--unstyled">
{foreach $sArticle.sLinks as $information}
{if $information.supplierSearch}
{* Vendor landing page link *}
{block name='frontend_detail_description_links_supplier'}
<li class="list--entry">
{s name="DetailDescriptionLinkInformation" assign="snippetDetailDescriptionLinkInformation"}{/s}
<a href="{url controller='listing' action='manufacturer' sSupplier=$sArticle.supplierID}"
target="{$information.target}"
class="content--link link--supplier"
title="{$snippetDetailDescriptionLinkInformation|escape}">
<i class="icon--install"></i> {s name="DetailDescriptionLinkInformation"}{/s}
</a>
</li>
{/block}
{else}
{* Links which will be added throught the administration *}
{block name='frontend_detail_description_links_link'}
<li class="list--entry">
<a href="{$information.link}"
target="{if $information.target}{$information.target}{else}_blank{/if}"
class="content--link link--further-links"
title="{$information.description|escapeHtml}">
<i class="icon--install"></i> {$information.description|escapeHtml}
</a>
</li>
{/block}
{/if}
{/foreach}
</ul>
{/block}
{/if}
{/block}
Und hier meine tabs.tpl
{extends file="parent:frontend/detail/tabs.tpl"}
{* New tab *}
{block name="frontend_detail_tabs_description"}
{$smarty.block.parent}
<a class="tab--link" title="{s namespace="frontend/detail" name='NewTabsDescription4'}{/s}" href="#">{s namespace="frontend/detail" name='NewTabsDescription4'}{/s}
<span class="product--rating-count-wrapper">
<span class="product--rating-count">{$sArticle.sLinks|@count}</span>
</span>
</a>
{/block}
{* New Tab container Firmware*}
{block name="frontend_detail_tabs_content_description"}
{$smarty.block.parent}
<div class="tab--container">
<div class="tab--header"><a class="tab--title" title="{s namespace="frontend/detail" name='NewTabsDescription4'}{/s}" href="#">{s namespace="frontend/detail" name='NewTabsDescription4'}{/s}</a><span class="product--rating-count">{$sArticle.sLinks|@count}</span></div>
<div class="tab--preview">{$sArticle.attr9|strip_tags|truncate:200: '...'}<a href="#" class="tab--link" title="{s name="PreviewTextMore"}{/s}">{s name="PreviewTextMore"}{/s}</a></div>
<div class="tab--content">{include file="frontend/detail/tabs/custom_tabs4.tpl"}</div>
</div>
{/block}