# Hilfe für tpl. Anpassung "Lieferantenbestellung"

**URL:** <https://forum.shopware.com/t/hilfe-fur-tpl-anpassung-lieferantenbestellung/68068>\
**Category:** Plugins\
**Tags:** shopware-erp-powered\
**Created:** [1. Juli 2020 um 18:06 UTC](https://forum.shopware.com/t/hilfe-fur-tpl-anpassung-lieferantenbestellung/68068 "2020-07-01T18:06:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RehhausBerlin](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@RehhausBerlin](https://forum.shopware.com/u/RehhausBerlin)\
**Post date:** [1. Juli 2020 um 18:06 UTC](https://forum.shopware.com/t/hilfe-fur-tpl-anpassung-lieferantenbestellung/68068/1 "2020-07-01T18:06:33Z")

</div>

Hallo,  
ich bin dabei meine **Lieferantenbestellung** an zu passen.  
Bräuchte jetzt noch&nbsp;Hilfen…

1. Wie kann ich die Bilder der Varianten nutzen? der Bilder-Code ist zwar von @Pickware‍ aber es erscheinen immer nur die Grundfarben.  
Die Varianten selbst werden angezeigt, nur die Bilderzuordnung klappt wohl nicht.
2. Kann man in der Lieferantenbestellung die gesamtenen Kosten als (Total Kosten) anzeigen lassen an letzer stelle?  
**Beispiel** :  
Artikel 1: 500 \* 0,75 = 375,00  
Artikel 2: 250 \* 0,80 = 200,00  
Total: $ 575,00
3. Die Page Zahl verändert sich nicht, es bleigt bei Page 1 of 1 stehen obwohl es bereits 2 Seiten sind.
4. Der Footer ist auf der erstenseite leer und Taucht auf Seite 2 auf, wie stelle ich es ein, dass es auf allen Seiten angezeigt wird?

**&nbsp;Hier habt Ihr mal meiner tpl. Date** i:  
&nbsp;

```
{namespace name=backend/viison_pickware_erp_supplier_orders/document}
{extends file="parent:documents/supplier_order.tpl"}

{*
    Dieses Template erweitert das Shopware Standard Rechnungstemplate index.tpl

    Jede Spalte der Tabelle (Header-Zeile und Inhalt) kann durch Blöcke erweitert oder ersetzt werden.

    Sie haben dabei Zugriff auf alle Informationen über den Lieferanten:
    {$Supplier} entspricht dem Pickware Model Shopware\CustomModels\ViisonPickwareERP\Supplier\Supplier

    Innerhalb der Tabelle (block name="document_index_table_each") haben Sie Zugriff auf Artikelinformationen der Position:
    {$position.article} entspricht dem Pickware Model Shopware\CustomModels\ViisonPickwareERP\SupplierOrder\SupplierOrderItem
    {$position.article->getArticleDetail()} entspricht dem Shopware Model Shopware\Models\Article\Detail
    {$position.article->getArticleDetail()->getAttribute()} entspricht den Shopware Artikel Attributen (Freitextfeldern)
    {$position.article->getArticleDetail()->getAttribute()->getAttr1()} bspw. ein Zugriff auf Attribut1 (Freitextfeld 1)

    Über das Shopware Model Shopware\Models\Article\Detail können Sie Artikelbilder in der Tabelle anzeigen (Beispiel):
    {if $position.article->getArticleDetail()->getArticle()->getImages()->first()}
        
    {/if}

    Weitere Informationen zum Variablenzugriff in Smarty Templates finden Sie hier:
    http://www.smarty.net/docs/en/language.syntax.variables.tpl
*}

	
{block name="document_index_head_extra_fields"}
	
		{s name="DocumentIndexHeadImage"}Bild{/s}
	
	
		{s name="DocumentIndexHeadUnit"}Q'ty (pcs){/s}
	
	{s name="DocumentIndexHeadDescription"}Description{/s}
	{s name="DocumentIndexHeadShippingCondition"}Versand Kondition{/s}
	
		
			{s name="DocumentIndexHeadPurchasePrice"}Preis{/s}
		
	
	
		
			{s name="DocumentIndexHeadCompletePrice"}Gesamtpreis{/s}
		
	
{/block}

{block name="document_index_table_each_extra_fields"}
	
		{if $position.article->getArticleDetail()->getArticle()->getImages()->first()}
			
		{/if}
	
	
		{$position.orderAmount}
	
	
		{$position.article->getArticleDetail()->getAttribute()->getSupplierdescription()}
	
	
		{$position.article->getArticleDetail()->getAttribute()->getSuppliershipping()}
	
	
	    {if $currency.symbolOnLeft}
	        {$currency.symbol}
	    {/if}
	    {$position.article->getPrice()}
	    {if !$currency.symbolOnLeft}
	        {$currency.symbol}
	    {/if}
	
	
	    {if $currency.symbolOnLeft}
	        {$currency.symbol}
	    {/if}
	    {math equation="price * amount"
      price=$position.article->getPrice()
      amount=$position.orderAmount format="%.2f"}
      {if !$currency.symbolOnLeft}
	        {$currency.symbol}
	    {/if}
	    
	
{/block}

{block name="document_index_head_amount"}{/block}
{block name="document_index_head_frabricatornumber"}{/block}
{block name="document_index_head_frabricator"}{/block}
{block name="document_index_head_articlename"}{/block}
{block name="document_index_head_unit"}{/block}

{block name="document_index_table_each_unit"}{/block}
{block name="document_index_table_each_fabricatornumber"}{/block}
{block name="document_index_table_each_fabricator"}{/block}
{block name="document_index_table_each_name"}{/block}
{block name="document_index_table_each_orderAmount"}{/block}

{block name="document_index_head_articlenumber"}{/block}

{block name="document_index_table_each_articlenumber"}{/block}

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![RehhausBerlin](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@RehhausBerlin](https://forum.shopware.com/u/RehhausBerlin)\
**Post date:** [9. Juli 2020 um 10:02 UTC](https://forum.shopware.com/t/hilfe-fur-tpl-anpassung-lieferantenbestellung/68068/2 "2020-07-09T10:02:48Z")

</div>

Keiner eine Idee?

---

<div class="post-metadata">

**Author:** ![PStadtfeld](https://avatars.discourse-cdn.com/v4/letter/p/3bc359/32.png) [@PStadtfeld](https://forum.shopware.com/u/PStadtfeld)\
**Post date:** [9. Juli 2020 um 10:27 UTC](https://forum.shopware.com/t/hilfe-fur-tpl-anpassung-lieferantenbestellung/68068/3 "2020-07-09T10:27:22Z")

</div>

zu Punkte 2 wäre meine Idee während des Durchlaufs der Positionen einfach die jeweiligen Preise in einer Variable zu addieren:

```
{assign var='PositionSum' value= {math equation="price * amount"
                                  price=$position.article->getPrice()
                                  amount=$position.orderAmount format="%.2f"} }
{assign var='TotalSum' value=$TotalSum+$PositionSum}

//Ausgabe
{$PositionSum}

// ...

Total: {$TotalSum}

```

bzgl. Footer und Seitenzahl denke ich mal, hängen die Punkte 3 und 4 direkt zusammen, aber wo man nun einstellt, ob er Seite 1 mitzählt oder nicht kann ich aus dem Stehgreif auch nicht sagen…

---

<div class="post-metadata">

**Author:** ![RehhausBerlin](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@RehhausBerlin](https://forum.shopware.com/u/RehhausBerlin)\
**Post date:** [9. Juli 2020 um 15:15 UTC](https://forum.shopware.com/t/hilfe-fur-tpl-anpassung-lieferantenbestellung/68068/4 "2020-07-09T15:15:45Z")

</div>

Hallo @PStadtfeld‍,  
vielen Dank für Deine anregung.  
Habe mich selbst an Pickware gewendet, ohne wirklich zu helfen.  
Ich werde Dein Weg mal weiter gehen und Testen…
