Advertisement
swkweb

Mail Template - HTML

Nov 29th, 2021
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.19 KB | None | 0 0
  1. {$subPosition = 0}
  2. {foreach item=details key=position from=$sOrderDetails}
  3.     {if $details.swkweSetArticles || !in_array($details.modus, [20, 21])}
  4.         <tr>
  5.             <td style="border-bottom:1px solid #cccccc;">{$position-$subPosition+1|fill:4} </td>
  6.             <td style="border-bottom:1px solid #cccccc;">{if $details.image.src.0 && in_array($details.modus, [0, 20])}<img style="height: 57px;" height="57" src="{$details.image.src.0}" alt="{$details.articlename}" />{else} {/if}</td>
  7.             <td style="border-bottom:1px solid #cccccc;">
  8.                 {$details.articlename|wordwrap:80|indent:4}<br>
  9.                 Artikel-Nr: {$details.ordernumber|fill:20}
  10.                 {if $details.swkweSetArticles}
  11.                     {if is_array($details.swkweSetArticles)}
  12.                         {foreach $details.swkweSetArticles['options'] as $option}
  13.                             <br>- {if $option['quantity'] != 1}{$option['quantity']}x {/if}{$option['basketItem']['name']}
  14.                             {if $option['subSetOrder']}
  15.                                 {foreach $option['subSetOrder']['options'] as $subSetOption}
  16.                                     <br>  - {if $subSetOption['quantity'] != 1}{$subSetOption['quantity']}x {/if}{$subSetOption['basketItem']['name']}
  17.                                 {/foreach}
  18.                             {/if}
  19.                         {/foreach}
  20.                         {$detailAmount = (!$additional.show_net) ? $details.swkweSetArticles['netAmount'] : $details.swkweSetArticles['grossAmount']}
  21.                         {$detailPrice = $detailAmount / $details['quantity']}
  22.                     {else}
  23.                         {foreach $details.swkweSetArticles->getOptions() as $option}
  24.                             <br>- {if $option->getQuantity() != 1}{$option->getQuantity()}x {/if}{$option->getBasketItem()->getName()}
  25.                             {if $option->getSubSetOrder()}
  26.                                 {foreach $option->getSubSetOrder()->getOptions() as $subSetOption}
  27.                                     <br>  - {if $subSetOption->getQuantity() != 1}{$subSetOption->getQuantity()}x {/if}{$subSetOption->getBasketItem()->getName()}
  28.                                 {/foreach}
  29.                             {/if}
  30.                         {/foreach}
  31.                         {$detailPrice = (!$additional.show_net) ? $details.swkweSetArticles->getNetPrice() : $details.swkweSetArticles->getGrossPrice()}
  32.                         {$detailAmount = (!$additional.show_net) ? $details.swkweSetArticles->getNetAmount() : $details.swkweSetArticles->getGrossAmount()}
  33.                     {/if}
  34.                 {else}
  35.                     {$detailPrice = $details.price}
  36.                     {$detailAmount = $details.amount}
  37.                 {/if}
  38.             </td>
  39.             <td style="border-bottom:1px solid #cccccc;">{$details.quantity|fill:6}</td>
  40.             <td style="border-bottom:1px solid #cccccc;">{$detailPrice|padding:8|currency}</td>
  41.             <td style="border-bottom:1px solid #cccccc;">{$detailAmount|padding:8|currency}</td>
  42.         </tr>
  43.     {elseif in_array($details.modus, [20, 21])}
  44.         {$subPosition = $subPosition + 1}
  45.     {/if}
  46. {/foreach}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement