Files
kupshop/web/templates/x/account/orderView-inner.tpl
2025-08-02 16:30:27 +02:00

260 lines
9.6 KiB
Smarty

{function renderOrderRepeatLink}
<a href="{path('kupshop_content_orders_orderreorder', ['id' => $body.order.id, 'cf' => $body.order->getSecurityCode()])}"
class="btn {$tpl_vars.invoice_btn_class}">
{t}Opakovat objednávku{/t}
</a>
{/function}
{block "tpl-vars"}
{$tpl_vars.invoice_btn_class = "btn-secondary pull-right"}
{$tpl_vars.btns_class = "btn-secondary"}
{/block}
{change_currency currency=$body.order->currency}
<div class="page-orderview cart-summary">
{get_contexts country=1 assign='contexts'}
{$allCountries = $contexts.country->getAll()}
{include 'block.messages.tpl'}
{if $body.error != ''}
<div class="alert alert-info" role="alert">
{$body.error nofilter}
</div>
{/if}
{block "order-payment"}
{if $body.payment and $body.payment->hasPaymentDescription() and $body.order->isActive() and !$body.order->isPaid()}
{get_smarty assign="smartyObject"}
{$body.payment->getOrderViewDescription($smartyObject) nofilter}
{/if}
{/block}
{block "orderview-top"}
{block "order-invoice"}
{if $cfg.Modules.orders.show_invoice == 'Y'}
{if $body.order.date_handle}
<a href="{path('kupshop_orderingbundle_pdfinvoice', ['id_order' => $body.order.id, 'cf' => $body.order->getSecurityCode()])}"
class="btn {$tpl_vars.invoice_btn_class}">{t}Faktura{/t}</a>
{/if}
{/if}
{/block}
{block "order-repeat-link"}
{renderOrderRepeatLink}
{/block}
{block "order-title"}
<h2>{t}Detail objednávky{/t}</h2>
{/block}
<div class="orderview-buttons">
{if $body.order->getDeliveryType() and $body.order->package_id}
{$orderTrackAndTraceLink = $body.order->getDeliveryType()->getDelivery()->getTrackAndTraceLink($body.order->package_id, $body.order)}
{if $orderTrackAndTraceLink}
<a href="{$orderTrackAndTraceLink}" target="_blank" class="btn {$tpl_vars.btns_class}">{t}Sledovat zásilku{/t}</a>
{/if}
{/if}
{block "orderview-buttons"}{/block}
</div>
{/block}
<div class="orderview-row">
<div class="column">
<p class="title-default">{t}Datum objednání{/t}</p>
{block "orderview-date"}
{$body.order.date_created|date_format:"%d.%m.%Y"}
{/block}
</div>
<div class="column">
<p class="title-default">{t}Stav objednávky{/t}</p>
{block "order-status"}
{if $body.order.status_storno}
{t}Objednávka stornována{/t}
{else}
{if !$body.editable}
{$body.order.status_text}
{else}
Zpracování pozastaveno!
<br>
Čeká se na potvrzení změn
{/if}
{/if}
{/block}
</div>
{$deliveryType = $body.order->getDeliveryType()}
{if $deliveryType}
<div class="column">
<p class="title-default"> {t}Doprava a platba{/t}</p>
<ul>
<li>{$deliveryType->delivery}
{$delivery = $deliveryType->getDelivery()}
</li>
{$payment = $deliveryType->getPayment()}
{if $payment}
<li>{$payment->getName() nofilter} </li>
{/if}
</ul>
</div>
{/if}
</div>
{block "orderview-address"}
<div class="orderview-row">
<div class="column">
<p class="title-default">{t}Kontaktní údaje{/t}</p>
<ul>
<li><strong>{$body.order.invoice_name} {$body.order.invoice_surname}</strong></li>
<li>{$body.order.invoice_email}</li>
<li>{$body.order.invoice_phone}</li>
</ul>
</div>
{if $body.order.invoice_street}
<div class="column">
<p class="title-default">{t}Fakturační adresa{/t}</p>
<ul>
<li>{$body.order.invoice_street}</li>
{if $body.order.invoice_custom_address}
<li>{$body.order.invoice_custom_address}</li>
{/if}
<li>{$body.order.invoice_zip} {$body.order.invoice_city}</li>
{if $body.order.invoice_state}
<li>{$body.order.invoice_state}</li>
{/if}
{if $allCountries[$body.order.invoice_country]}
<li>{$allCountries[$body.order.invoice_country]->getName()}</li>
{/if}
</ul>
</div>
{/if}
{if $body.order.delivery_name || $body.order.delivery_surname || $body.order.delivery_street}
<div class="column">
<p class="title-default">{t}Dodací adresa{/t}</p>
<ul>
<li>{$body.order.delivery_name} {$body.order.delivery_surname}</li>
{if $body.order.delivery_firm and $body.order.delivery_firm != $body.order.delivery_name|cat:" "|cat:$body.order.delivery_surname}
<li>{$body.order.delivery_firm}</li>
{/if}
<li>{$body.order.delivery_street}</li>
{if $body.order.delivery_custom_address}
<li>{$body.order.delivery_custom_address}</li>
{/if}
<li>{$body.order.delivery_zip} {$body.order.delivery_city}</li>
{if $body.order.delivery_state}
<li>{$body.order.delivery_state}</li>
{/if}
{if $allCountries[$body.order.delivery_country]}
<li>{$allCountries[$body.order.delivery_country]->getName()}</li>
{/if}
{if $body.order.delivery_phone}
<li>{$body.order.delivery_phone}</li>
{/if}
</ul>
</div>
{/if}
{if $body.order.invoice_firm}
<div class="column">
<p class="title-default">{t}Firemní údaje{/t}</p>
<ul>
<li>{$body.order.invoice_firm}</li>
{if $body.order.invoice_ico}
<li>{t}IČO{/t}: {$body.order.invoice_ico}</li>
{/if}
{if $body.order.invoice_dic}
<li>{t}DIČ{/t}: {$body.order.invoice_dic}</li>
{/if}
</ul>
</div>
{/if}
</div>
{/block}
{block "order-note"}
{if $body.order.note_user}
<p class="title-default">{t}Poznámka k objednávce{/t}</p>
<p>{$body.order.note_user|escape:'htmlall'|nl2br nofilter}</p>
{/if}
{if $body.order.noteAdmin}
<p>{t}Poznámka pro zákazníka{/t}</p>
<p class="title-default">{$body.order.noteAdmin}</p>
{/if}
{/block}
<p class="title-default">{t}Objednané zboží{/t}</p>
{include "account/orderView.products.tpl"}
{block "order-bonus-program"}
{ifmodule BONUS_PROGRAM}
{include "bonus-program/bonus-program-orderview.tpl"}
{/ifmodule}
{/block}
<div class="cart-footer">
<div class="price-box">
{block "pricebox-without-vat"}
{if $dbcfg.shop_vat_payer}
<div class="price-box-row">
<p>{t}Celková částka bez DPH{/t}</p>
<p>{$body.order.total_price_array.value_without_vat|format_price:"ceil=no"}</p>
</div>
{/if}
{/block}
{block "pricebox-with-vat"}
<div class="price-box-row total-price">
<p class="total-price">{t}Celková částka s DPH{/t}</p>
<p>{$body.order.total_price_array.value_with_vat|format_price:"ceil=no;decimal=dynamic"}</p>
</div>
{/block}
</div>
</div>
{block "order-manuals"}
{ifmodule ATTACHMENTS__MANUALS}
{if $body.order.items}
{insert_products_manuals products=$body.order.items template="account/orderView.products-manuals.tpl"}
{/if}
{/ifmodule}
{/block}
{block "order-custom-data"}{/block}
{block "orderview-history"}
<div class="orderview-history">
<h2>{t}Historie objednávky{/t}</h2>
<div class="table-wrapper">
<table class="table">
<thead>
<tr>
<th>{t}Datum{/t}</th>
<th>{t}Stav{/t}</th>
<th>{t}Poznámka{/t}</th>
</tr>
</thead>
<tbody>
{foreach $body.order->getHistory() as $history}
<tr>
<td>{$history.date|date_format:"%d.%m.%Y"}<br>
{$history.date|date_format:"%H:%M"}</td>
<td>{$view.orderInfo->getOrderStatus($history.id_status)}</td>
<td>{$history.comment nofilter}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
{/block}
</div>
{/change_currency}