Files
kupshop/web/templates/elnino/ordering/ordering.pricebox.tpl
2025-08-02 16:30:27 +02:00

81 lines
3.2 KiB
Smarty

<div data-reload="price">
{if $module.ORDER_DISCOUNT && ($body->getPurchaseState()->getDiscounts() || $body->getPurchaseState()->getCharges())}
{$cartDiscountActive = true}
{/if}
<div class="price-box">
{if $transport==1 or $cartDiscountActive}
<div class="price-box-row">
<p>{t}Cena zboží{/t}</p>
<p>{if $noVat}{$body.totalPriceNoVat|format_price}{else}{$body.totalPriceWithVat|format_price}{/if}</p>
</div>
{/if}
{* Render order discounts (new) *}
{if $body->getPurchaseState()->getDiscounts()|count && findModule('order_discount')}
{foreach $body->getPurchaseState()->getDiscounts() as $discount}
{if is_a($discount, 'KupShop\OrderingBundle\Entity\Purchase\DiscountPurchaseItem')}
{block "pricebox-order-discount"}
<div class="price-box-row discount">
<p>{$discount->getName()}</p>
<p>{if $noVat}{$discount->getPrice()->getPriceWithoutVat()|format_price}{else}{$discount->getPriceWithVat()|format_price:"ceil=no;decimal=dynamic"}{/if}</p>
</div>
{/block}
{/if}
{/foreach}
{/if}
{if $body->getPurchaseState()->getCharges()}
{foreach $body->getPurchaseState()->getCharges() as $charge}
<div class="price-box-row">
<p>{$charge->getName()}</p>
{block "pricebox-order-charge-price"}
<p>{$charge->getPrice()|format_price}</p>
{/block}
</div>
{/foreach}
{/if}
{*{if $body.transport}
<div class="price-box-row">
<p>{t}Doprava a platba{/t}</p>
<p>
{$delivery = $body->getDeliveryType()}
{if $noVat}{$delivery.price.value_without_vat|format_price}{else}{$delivery.price.value_with_vat|format_price}{/if}
</p>
</div>
{/if}*}
{block "pricebox-without-vat"}
{/block}
{block "pricebox-total"}
<div class="price-box-row total-price">
<p>{t}Celková částka s DPH{/t}</p>
<p>{$body.totalPricePay|format_price}</p>
</div>
{/block}
{if $body.products|count}
{if $body.stepName == 'cart'}
{$next_text = "{t}Přejít k pokladně{/t}"}
{$next_name = "OrderNext"}
{$next_value = "delivery"}
{elseif $isLastStep}
{$next_text = "{t price=$body->getPurchaseState()->getTotalPrice()|format_price}Koupit za {price}{/t}"}
{$next_name = "SubmitOrder"}
{$next_value = "{t price=$body->getPurchaseState()->getTotalPrice()|format_price}Koupit za {price}{/t}"}
{elseif $body.stepName == 'delivery'}
{$next_text = "{t}Pokračovat na kontaktní údaje{/t}"}
{$next_name = "OrderNext"}
{$next_value = "user"}
{/if}
<button type="submit" name="{$next_name}" value="{$next_value}" class="btn btn-ctr btn-block {if $isLastStep}btn-ordering-laststep{/if}">
{$next_text}
</button>
{block 'submit-btn-additional-text'}{/block}
{/if}
</div>
</div>