Jump to content

[Gelöst] Staffelpreise Anzeige auf Produktseite


Recommended Posts

Irgendwie gefällt mir die Anzeige der Staffelpreise nicht. Ich möchte keinen Rabatt auf die Stückzahl geben und auch keine Ersparnis anzeigen. Die Anzeige soll in etwa so aussehen:

Ab       Preis
50       0,50€
100     0,40€
200     0,30€

Ohne viel drum herum. Konnte das schon jemand lösen bzw weiß wo die Einstellungen sind?

Gruß

Dirk
 

Staffel.PNG

Edited by Timmermann (see edit history)
Link to comment
Share on other sites

Im Backoffice bei den Produkteinstellungen kannst du zunächst wählen, dass anstelle der Höhe des Rabatts der rabattierte Preis angezeigt wird, dann musst du nur noch die dritte Spalte ausblenden (müsste übrigens alternativ auch per CSS funktionieren).

Link to comment
Share on other sites

Habe es auf eine unsanfte Art und Weise hinbekommen.
Funktioniert aber dann nur für Euro - ansonsten hätte er die Währung nicht angezeigt. Ist aber nicht schlimm, verkaufe eh nur in Deutschland bzw vielleicht später einmal im Euro-Raum.

Falls es jemanden interessiert:

in themes/DEINTHEME/templates/catalog/_partials/product-discounts.tpl

<section class="product-discounts js-product-discounts">
  {if $product.quantity_discounts}
    <p class="h6 product-discounts-title">{l s='Volume discounts' d='Shop.Theme.Catalog'}</p>
    {block name='product_discount_table'}
      <table class="table-product-discounts">
        <thead>
        <tr>
          <th>{l s='Menge ab' d='Shop.Theme.Catalog'}</th>
          <th>{l s='Einzelpreis' d='Shop.Theme.Catalog'}</th>
        </tr>
        </thead>
        <tbody>
        {foreach from=$product.quantity_discounts item='quantity_discount' name='quantity_discounts'}
          <tr data-discount-type="{$quantity_discount.reduction_type}" data-discount="{$quantity_discount.real_value}">
            <td>{$quantity_discount.quantity}</td>
            <td>{$quantity_discount.price|number_format:2:",":"."} €</td>
            </tr>
        {/foreach}
        </tbody>
      </table>
    {/block}
  {/if}
</section>

 

Link to comment
Share on other sites

  • Timmermann changed the title to [Gelöst] Staffelpreise Anzeige auf Produktseite

Korrektur:
ACHTUNG - beim oberen Script wird der Preis ohne Steuer ausgegeben, in der Preisanzeige allerdings mit.

Korrekt sieht der Code folgendermaßen aus:

 

<section class="product-discounts js-product-discounts">
  {if $product.quantity_discounts}
    <p class="h6 product-discounts-title">{l s='Volume discounts' d='Shop.Theme.Catalog'}</p>
    {assign var="tax_rate" value=$product.rate}
    <table class="table-product-discounts">
      <thead>
      <tr>
        <th>{l s='Menge ab' d='Shop.Theme.Catalog'}</th>
        <th>{l s='Einzelpreis (inkl. MwSt.)' d='Shop.Theme.Catalog'}</th>
      </tr>
      </thead>
      <tbody>
      {foreach from=$product.quantity_discounts item='quantity_discount'}
        {assign var="price_gross" value=($quantity_discount.price * (1 + $tax_rate/100))}
        <tr>
          <td>{$quantity_discount.quantity}</td>
          <td>{$price_gross|number_format:2:",":"."} € <small>{l s='inkl. MwSt.' d='Shop.Theme.Catalog'}</small></td>
        </tr>
      {/foreach}
      </tbody>
    </table>
  {/if}
</section>

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...