Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PLAIN:
- {$subPosition = 0}
- {foreach item=details key=position from=$sOrderDetails}
- {* $details|print_r *}
- {if $details.swkweSetArticles || !in_array($details.modus, [20, 21])}
- {if $details.swkweSetArticles}
- {if is_array($details.swkweSetArticles)}
- {$detailAmount = (!$additional.show_net) ? $details.swkweSetArticles['netAmount'] : $details.swkweSetArticles['grossAmount']}
- {$detailPrice = $detailAmount / $details['quantity']}
- {else}
- {$detailPrice = (!$additional.show_net) ? $details.swkweSetArticles->getNetPrice() : $details.swkweSetArticles->getGrossPrice()}
- {$detailAmount = (!$additional.show_net) ? $details.swkweSetArticles->getNetAmount() : $details.swkweSetArticles->getGrossAmount()}
- {/if}
- {else}
- {$detailPrice = $details.price}
- {$detailAmount = $details.amount}
- {/if}
- {{$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"}
- {if $details.swkweSetArticles}
- {if is_array($details.swkweSetArticles)}
- {foreach $details.swkweSetArticles['options'] as $option}
- - {if $option['quantity'] != 1}{$option['quantity']}x {/if}{$option['basketItem']['name']}
- {if $option['subSetOrder']}
- {foreach $option['subSetOrder']['options'] as $subSetOption}
- - {if {$subSetOption['quantity']} != 1}{$subSetOption['quantity']}x {/if}{$subSetOption['basketItem']['name']}
- {/foreach}
- {/if}
- {/foreach}
- {else}
- {foreach $details.swkweSetArticles->getOptions() as $option}
- - {if $option->getQuantity() != 1}{$option->getQuantity()}x {/if}{$option->getBasketItem()->getName()}
- {if $option->getSubSetOrder()}
- {foreach $option->getSubSetOrder()->getOptions() as $subSetOption}
- - {if {$subSetOption->getQuantity()} != 1}{$subSetOption->getQuantity()}x {/if}{$subSetOption->getBasketItem()->getName()}
- {/foreach}
- {/if}
- {/foreach}
- {/if}
- {/if}
- {elseif in_array($details.modus, [20, 21])}
- {$subPosition = $subPosition + 1}
- {/if}
- {/foreach}
- HTML:
- {$subPosition = 0}
- {foreach item=details key=position from=$sOrderDetails}
- {if $details.swkweSetArticles || !in_array($details.modus, [20, 21])}
- <tr>
- <td style="border-bottom:1px solid #cccccc;">{$position-$subPosition+1|fill:4} </td>
- <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>
- <td style="border-bottom:1px solid #cccccc;">
- {$details.articlename|wordwrap:80|indent:4}<br>
- Artikel-Nr: {$details.ordernumber|fill:20}
- {if $details.swkweSetArticles}
- {if is_array($details.swkweSetArticles)}
- {foreach $details.swkweSetArticles['options'] as $option}
- <br>- {if $option['quantity'] != 1}{$option['quantity']}x {/if}{$option['basketItem']['name']}
- {if $option['subSetOrder']}
- {foreach $option['subSetOrder']['options'] as $subSetOption}
- <br> - {if $subSetOption['quantity'] != 1}{$subSetOption['quantity']}x {/if}{$subSetOption['basketItem']['name']}
- {/foreach}
- {/if}
- {/foreach}
- {$detailAmount = (!$additional.show_net) ? $details.swkweSetArticles['netAmount'] : $details.swkweSetArticles['grossAmount']}
- {$detailPrice = $detailAmount / $details['quantity']}
- {else}
- {foreach $details.swkweSetArticles->getOptions() as $option}
- <br>- {if $option->getQuantity() != 1}{$option->getQuantity()}x {/if}{$option->getBasketItem()->getName()}
- {if $option->getSubSetOrder()}
- {foreach $option->getSubSetOrder()->getOptions() as $subSetOption}
- <br> - {if $subSetOption->getQuantity() != 1}{$subSetOption->getQuantity()}x {/if}{$subSetOption->getBasketItem()->getName()}
- {/foreach}
- {/if}
- {/foreach}
- {$detailPrice = (!$additional.show_net) ? $details.swkweSetArticles->getNetPrice() : $details.swkweSetArticles->getGrossPrice()}
- {$detailAmount = (!$additional.show_net) ? $details.swkweSetArticles->getNetAmount() : $details.swkweSetArticles->getGrossAmount()}
- {/if}
- {else}
- {$detailPrice = $details.price}
- {$detailAmount = $details.amount}
- {/if}
- </td>
- <td style="border-bottom:1px solid #cccccc;">{$details.quantity|fill:6}</td>
- <td style="border-bottom:1px solid #cccccc;">{$detailPrice|padding:8|currency}</td>
- <td style="border-bottom:1px solid #cccccc;">{$detailAmount|padding:8|currency}</td>
- </tr>
- {elseif in_array($details.modus, [20, 21])}
- {$subPosition = $subPosition + 1}
- {/if}
- {/foreach}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement