Da standardmässig die Staffelpreistabelle nur bei der Detailansicht des Produktes gezeigt wird, mein Kunde diese jedoch auch in der Produkteliste anzeigen wollte, habe ich mal was gebastelt. Ist sicherlich nicht die eleganteste Lösung, aber es funktioniert.
Hier der Code:
Gelöst in der product_listing_v1.html:
PHP-Code:
<p class="price">
{if $module_data.group_price.prices}
<table class="tabledetails" width="40%" border="0" cellspacing="0" cellpadding="4">
<tr class="headerrow">
<td>{txt key=TEXT_QTY}</td>
<td>{txt key=TEXT_SINGLE_PRICE}</td>
</tr>
{section name=tabelle loop=$module_data.group_price.prices}
<tr class="{cycle values="contentrow1,contentrow2"}">
<td>
{if $module_data.group_price.prices[tabelle].qty == 1}
{$module_data.group_price.prices[tabelle].qty} - {$module_data.group_price.prices[tabelle.index_next].qty-1}
{else}
{if $module_data.group_price.prices[tabelle.index_next].qty}
{$module_data.group_price.prices[tabelle].qty} - {$module_data.group_price.prices[tabelle.index_next].qty-1}
{else}
>={$module_data.group_price.prices[tabelle].qty}
{/if}
{/if}
</td>
<td>
{php}
global $currency;
echo $currency->prefix;
{/php}
{$module_data.group_price.prices[tabelle].price|string_format:"%.2f"}
</td>
</tr>
{/section}
</table>
{/if}
</p>