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

121 lines
4.2 KiB
Smarty

{extends "index.tpl"}
{block "css-entry" append}
{encore_entry_link_tags entry='cart'}
{/block}
{block "meta-robots"}
<meta name="robots" content="noindex, nofollow">
{/block}
{block "header"}
{include "ordering/ordering.header.tpl"}
{/block}
{function printAvailability}
{block 'printAvailability'}
{if $product.availability == 0 and $product.inStore > 0} {* skladem jen částečně *}
<p class="delivery-partly">{$product.deliveryTimeText} {t pocet=$product.inStore escape=false}pouze {pocet}&nbsp;ks{/t}</p>
{elseif $product.availability eq 2}
<p class="delivery delivery-{$product.deliveryTime}">{t}skladem u dodavatele{/t}</p>
{else}
<p class="delivery delivery-{$product.deliveryTime}">{$product.deliveryTimeText}</p>
{/if}
{/block}
{/function}
{block "main"}
{block "tpl-vars"}
{$tpl_vars.summary_sidebar = true}
{$tpl_vars.voucher_in_first_step = true}
{$tpl_vars.voucher_btn_class = "btn-secondary"}
{$tpl_vars.zasilkovna_btn_class = "btn-secondary btn-sm" scope="global"}
{$tpl_vars.online_payment_visible_items = 2}
{$tpl_vars.delivery_country_picker = false}
{$tpl_vars.gdpr_checkbox = ($dbcfg.consent.enable == 'Y')}
{* $tpl_vars.delivery_collapsible = true *}
{* $tpl_vars.preselect_delivery = "false" *}
{* $tpl_vars.btns_in_sidebar = "true" *}
{* $tpl_vars.cart_sidebar = "true" *}
{$tpl_vars.ordering_user_v = $cfg.tpl.ordering_user.version}
{$tpl_vars.pricebox_cartsaving = false}
{$tpl_vars.disallowEditB2B = $isB2BUser and $dbcfg.b2b.disallowEditB2B == "Y"}
{$tpl_vars.optionalProductGifts = false}
{$tpl_vars.ordering_products_discount = false}
{/block}
{$placeholders = ["breadcrumbs" => []]}
<main class="main main-ordering main-{$body.stepName}" data-gtm-placeholders='{$placeholders|json_encode}'>
{block 'order-process'}
<div class="container-fluid order-process-container">
{include "ordering/ordering.process.tpl"}
</div>
{/block}
<div class="container order-container">
<form name="login" method="post" action="" id="cart"
class="cart-form cart-{$body.stepName}{if $tpl_vars.summary_sidebar} cart-form-sidebar{/if}">
{include "ordering/ordering.messages.tpl"}
{block 'cart-title'}
<h1>
{if $body.stepName == 'summary'}
{t}Shrnutí objednávky{/t}
{else}
{$view->getTitle()}
{/if}
</h1>
{/block}
{foreach $body.steps as $stepName => $step}
{if $step@last and $stepName == $body.stepName}
{$isLastStep = true scope='global'}
{/if}
{/foreach}
{block "content-wrapper"}
{if $tpl_vars.summary_sidebar and (($body.stepName != 'cart' and $body.stepName != 'summary') or $tpl_vars.cart_sidebar)}
<div class="order-content">
<div>
{block "content"}{/block}
</div>
{include 'ordering/ordering.summary-sidebar.tpl' show_voucher=$isLastStep}
</div>
{else}
{block "content"}{/block}
{block 'cart-footer'}{/block}
{/if}
{/block}
{block "cart-btns"}{/block}
</form>
</div>
{block "cart-also_bought"}
{/block}
</main>
{/block}
{block "js-entry" append}
{encore_entry_script_tags entry='cart'}
{/block}
{block "js-start" append}
<script>
// ignore js_shop_refresh cookie in order steps
wpj.jsShop.events.unshift(()=> {
wpj.jsShop.ignoreRefreshCookie();
});
</script>
{/block}
{block "js-dynamic-load" append}
{asset_compile}
<script src="/common/static/bootstrapvalidator/js/bootstrapValidator.js"></script>
<script src="/common/static/bootstrapvalidator/js/language/{$ctrl.active_language_code}.js"></script>
{/asset_compile}
<script>
{include "block.gtm.tpl" gtm_type="cartOnReady"}
</script>
{/block}