Advertisement
swkweb

Mail Template - PLAIN

Nov 29th, 2021
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.00 KB | None | 0 0
  1. {$subPosition = 0}
  2. {foreach item=details key=position from=$sOrderDetails}
  3. {* $details|print_r *}
  4. {if $details.swkweSetArticles || !in_array($details.modus, [20, 21])}
  5. {if $details.swkweSetArticles}
  6. {if is_array($details.swkweSetArticles)}
  7. {$detailAmount = (!$additional.show_net) ? $details.swkweSetArticles['netAmount'] : $details.swkweSetArticles['grossAmount']}
  8. {$detailPrice = $detailAmount / $details['quantity']}
  9. {else}
  10. {$detailPrice = (!$additional.show_net) ? $details.swkweSetArticles->getNetPrice() : $details.swkweSetArticles->getGrossPrice()}
  11. {$detailAmount = (!$additional.show_net) ? $details.swkweSetArticles->getNetAmount() : $details.swkweSetArticles->getGrossAmount()}
  12. {/if}
  13. {else}
  14. {$detailPrice = $details.price}
  15. {$detailAmount = $details.amount}
  16. {/if}
  17.  
  18. {{$position-$subPosition+1}|fill:4}  {$details.ordernumber|fill:20}  {$details.articlename|fill:49}  {$details.quantity|fill:6}  {$detailPrice|padding:8|currency|unescape:"htmlall"}  {$detailAmount|padding:8|currency|unescape:"htmlall"}
  19. {if $details.swkweSetArticles}
  20. {if is_array($details.swkweSetArticles)}
  21. {foreach $details.swkweSetArticles['options'] as $option}
  22.     - {if $option['quantity'] != 1}{$option['quantity']}x {/if}{$option['basketItem']['name']}
  23. {if $option['subSetOrder']}
  24. {foreach $option['subSetOrder']['options'] as $subSetOption}
  25.     - {if {$subSetOption['quantity']} != 1}{$subSetOption['quantity']}x {/if}{$subSetOption['basketItem']['name']}
  26. {/foreach}
  27. {/if}
  28. {/foreach}
  29. {else}
  30. {foreach $details.swkweSetArticles->getOptions() as $option}
  31.     - {if $option->getQuantity() != 1}{$option->getQuantity()}x {/if}{$option->getBasketItem()->getName()}
  32. {if $option->getSubSetOrder()}
  33. {foreach $option->getSubSetOrder()->getOptions() as $subSetOption}
  34.     - {if {$subSetOption->getQuantity()} != 1}{$subSetOption->getQuantity()}x {/if}{$subSetOption->getBasketItem()->getName()}
  35. {/foreach}
  36. {/if}
  37. {/foreach}
  38. {/if}
  39. {/if}
  40. {elseif in_array($details.modus, [20, 21])}
  41. {$subPosition = $subPosition + 1}
  42. {/if}
  43. {/foreach}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement