first commit
This commit is contained in:
61
web/templates/x/ordering/ordering.btns.sidebar.tpl
Normal file
61
web/templates/x/ordering/ordering.btns.sidebar.tpl
Normal file
@@ -0,0 +1,61 @@
|
||||
{$submitName = 'OrderNext'}
|
||||
{$valueNext = 'delivery'}
|
||||
|
||||
{if $body.stepName == 'delivery'}
|
||||
{$valueNext = 'user'}
|
||||
{elseif $body.stepName == 'user'}
|
||||
{$isLastStep = true}
|
||||
{$submitName = 'SubmitOrder'}
|
||||
{$valueNext = "{t price=$body->getPurchaseState()->getTotalPrice()|format_price:"ceil=no;decimal=dynamic"}Koupit za {price}{/t}"}
|
||||
{/if}
|
||||
|
||||
<div {if $body.stepName == 'cart'}data-reload="cart_btns"{/if}>
|
||||
<div class="cart-btns">
|
||||
{block "submit-btn"}
|
||||
{if $body.products|count}
|
||||
<div class="cart-nextstep-wrapper">
|
||||
<button type="submit" name="{$submitName}" value="{$submitName}"
|
||||
class="btn btn-nextstep btn-block {if $isLastStep}last{/if}">
|
||||
{if $isLastStep}
|
||||
{t price=$body->getPurchaseState()->getTotalPrice()|format_price:"ceil=no;decimal=dynamic"}Koupit za {price}{/t}
|
||||
{elseif $body.stepName == 'cart'}
|
||||
{t}Přejít k pokladně{/t}
|
||||
{elseif $body.stepName == 'delivery'}
|
||||
{t}Pokračovat na kontaktní údaje{/t}
|
||||
{else}
|
||||
{t}Pokračovat na další krok{/t}
|
||||
{/if}
|
||||
</button>
|
||||
|
||||
{if $isLastStep}
|
||||
<p>{t}Odesíláte objednávku s povinností platby{/t}</p>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
{ifmodule ORDER_DISCOUNT}
|
||||
{insert_discounts_triggers}
|
||||
{/ifmodule}
|
||||
|
||||
{if $showVoucher}
|
||||
{include "ordering/ordering.voucher.tpl" hidden=1}
|
||||
{/if}
|
||||
|
||||
{if $body.stepName == 'cart'}
|
||||
{get_referer assign='referer'}
|
||||
{if !$referer|stripos:'_z'}{$referer = '/'}{/if}
|
||||
<a href="{$referer}" class="btn-prevstep">{t}Zpět k nákupu{/t}</a>
|
||||
{else}
|
||||
{$step = $body->findPreviousStep($body.stepName)}
|
||||
<a href="{$cfg.Addr.rel}{$step.url}" class="btn-prevstep">
|
||||
{if $body.stepName == 'delivery'}
|
||||
{t}Zpět do košíku{/t}
|
||||
{elseif $body.stepName == 'user'}
|
||||
{t}Zpět na výběr dopravy a platby{/t}
|
||||
{else}
|
||||
{t}Předchozí krok{/t}
|
||||
{/if}
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
29
web/templates/x/ordering/ordering.btns.tpl
Normal file
29
web/templates/x/ordering/ordering.btns.tpl
Normal file
@@ -0,0 +1,29 @@
|
||||
{if $isLastStep}
|
||||
{include "ordering/ordering.gdpr.tpl"}
|
||||
{/if}
|
||||
|
||||
{block "ordering-btns-vars"}
|
||||
{$backClass = "btn-secondary"}
|
||||
{$nextClass = "btn-ctr"}
|
||||
{/block}
|
||||
|
||||
<div {if $body.stepName == 'cart'}data-reload="cart_btns"{/if}>
|
||||
<div class="cart-btns">
|
||||
{if $body.stepName == 'cart'}
|
||||
{get_referer assign='referer'}
|
||||
{if !$referer|stripos:'_z'}{$referer = '/'}{/if}
|
||||
<a href="{$referer}" class="btn btn-prevstep {$backClass}">{t}Zpět k nákupu{/t}</a>
|
||||
{else}
|
||||
{$step = $body->findPreviousStep($body.stepName)}
|
||||
<a href="{$cfg.Addr.rel}{$step.url}" class="btn btn-prevstep {$backClass}">{t}Předchozí krok{/t}</a>
|
||||
{/if}
|
||||
|
||||
{block "submit-btn"}
|
||||
{if $body.products|count}
|
||||
<button type="submit" name="{$submitName}" value="{$submitName}"
|
||||
class="btn btn-nextstep {$nextClass} {if $isLastStep}last{/if}">
|
||||
{if $isLastStep}{t price=$body->getPurchaseState()->getTotalPrice()|format_price:"ceil=no;decimal=dynamic"}Koupit za {price}{/t}{else}{t}Pokračovat na další krok{/t}{/if}</button>
|
||||
{/if}
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
19
web/templates/x/ordering/ordering.delivery.country.tpl
Normal file
19
web/templates/x/ordering/ordering.delivery.country.tpl
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="delivery-country">
|
||||
<label for="delivery-country" class="title-default">{t}Vyberte zemi doručení{/t}</label>
|
||||
<div class="delivery-country-select">
|
||||
{get_contexts country=1 assign='contexts'}
|
||||
{$activeCountry = $contexts.country->getActive()}
|
||||
<span class="country-flag" style="background-image: url('/common/static/images/flags/{$activeCountry.id|lower}.svg')"></span>
|
||||
<select class="form-control" name="delivery-country" id="{$select_id|default:"delivery-country"}">
|
||||
{if findModule(Modules::ORDERS, Modules::SUB_COUNTRY_SELECTION)}
|
||||
{$countries = $contexts.country->getSupported()}
|
||||
{else}
|
||||
{$countries = $contexts.country->getAll()}
|
||||
{/if}
|
||||
{foreach $countries as $country}
|
||||
<option value="{$country->getId()}"
|
||||
{if $country->getId() == $activeCountry->getId()}selected{/if}>{$country->getName()}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
80
web/templates/x/ordering/ordering.delivery.deliveries.tpl
Normal file
80
web/templates/x/ordering/ordering.delivery.deliveries.tpl
Normal file
@@ -0,0 +1,80 @@
|
||||
{$deliveries = $deliveries|default:$body->getDeliveries()}
|
||||
|
||||
{block 'title'}
|
||||
<div class="delivery-box-header">
|
||||
<p class="title-default">{t}Doprava{/t}</p>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
<div class="cart-box">
|
||||
{$availability = $availability|default:$body->getAvailability()}
|
||||
{foreach $deliveries as $id => $delivery}
|
||||
<div class="cart-box-row delivery-item delivery-item-{$delivery.class|lower}
|
||||
{if $delivery.exception and $delivery.exception->isDeliveryDisabled()}disabled{/if} {if $body.delivery_id == $id or ($tpl_vars.delivery_collapsible and $deliveries|count == 1)}selected{/if}" data-cart="item"
|
||||
data-tracking-click-delivery-type='{get_gtm_data encode=true type='ecommerce' method='AddDeliveryInfo' data=['delivery' => $delivery]}' >
|
||||
<label for="del{$id}" class="custom-radio custom-control delivery-content">
|
||||
<input type="radio" name="delivery_id" value="{$id}" id="del{$id}" class="custom-control-input"
|
||||
{if $delivery.exception and $delivery.exception->isDeliveryDisabled()}disabled{elseif $body.delivery_id == $id or ($tpl_vars.delivery_collapsible and $deliveries|count == 1)}checked{/if}> {*$body.input.balik_na_postu_zip.value or*}
|
||||
<span class="custom-control-indicator"></span>
|
||||
{if $delivery.photo}
|
||||
<span class="img">{photo photo=$delivery.photo}</span>
|
||||
{/if}
|
||||
<span class="title">{$delivery.name}
|
||||
{block 'ordering-delivery-subtitle'}
|
||||
<span class="subtitle">
|
||||
{if $delivery.exception}
|
||||
{$delivery.exception->getShortMessage()}
|
||||
{elseif $availability == 1}
|
||||
{$date = $delivery->getDeliveryDate()}
|
||||
{if $date and $delivery->isInPerson()}
|
||||
{t dne=$date|format_date_locale_pretty:'d. L.' escape=false}K vyzvednutí {dne}{/t}
|
||||
{elseif $date}
|
||||
{t dne=$date|format_date_locale_pretty:'d. L.' escape=false}Doručíme {dne}{/t}
|
||||
{/if}
|
||||
{/if}
|
||||
</span>
|
||||
{/block}
|
||||
</span>
|
||||
|
||||
{block "delivery-deliveries-price"}
|
||||
<span class="price">
|
||||
{$deliveryPrice = $view->getDeliveryPrice($id)}
|
||||
{if $delivery.exception or !$deliveryPrice}
|
||||
{* nic *}
|
||||
{elseif $deliveryPrice.value_with_vat->isPositive()}
|
||||
{$deliveryPrice.value_with_vat|format_price}
|
||||
{elseif $delivery.class|lower == "odbernaprodejne"}
|
||||
{t}vybrat prodejnu{/t}
|
||||
{else}
|
||||
{t}zdarma{/t}
|
||||
{/if}
|
||||
</span>
|
||||
{/block}
|
||||
</label>
|
||||
|
||||
{block "delivery-deliveries-description"}
|
||||
{$templateDescription = $delivery->getCartDescription()} {* vlastni sablona v enginu delivery.neco.description.tpl *}
|
||||
{$customDescription = $delivery->cart_description} {* vlastni popis z adminu *}
|
||||
{if $templateDescription or $customDescription}
|
||||
<div class="delivery_description" id="delivery_description_{$delivery.id}" style="display:none">
|
||||
{if $templateDescription}
|
||||
{$templateDescription nofilter}
|
||||
{else}
|
||||
{$customDescription nofilter}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
{block "delivery-reset"}
|
||||
{if $tpl_vars.delivery_collapsible and $deliveries|count > 1}
|
||||
<label for="del_reset" class="delivery-reset-label">
|
||||
<input type="radio" name="delivery_id" value="-1" id="del_reset" data-delivery-reset>
|
||||
<i class="fc icons_caret-left"></i>
|
||||
<span>{t}Změnit dopravu{/t}</span>
|
||||
</label>
|
||||
{/if}
|
||||
{/block}
|
||||
84
web/templates/x/ordering/ordering.delivery.payments.tpl
Normal file
84
web/templates/x/ordering/ordering.delivery.payments.tpl
Normal file
@@ -0,0 +1,84 @@
|
||||
{$payments = $payments|default:$body->getPayments()}
|
||||
|
||||
{block 'title'}
|
||||
<div class="delivery-box-header">
|
||||
<p class="title-default">{t}Platba{/t}</p>
|
||||
</div>
|
||||
{if $tpl_vars.delivery_collapsible}
|
||||
<p class="unselected-notify">{t}Vyberte nejprve dopravu{/t}</p>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block "cartbox-delivery-payments"}
|
||||
<div class="cart-box {block "cartbox-class"}{/block}">
|
||||
{foreach $payments as $id => $payment}
|
||||
{if !$payment.class->hasCartTemplate()}
|
||||
|
||||
{* todo disablovat v JS aby slo projit kosikem bez js *}
|
||||
<div class="cart-box-row payment-item payment-item-{$payment.class.class|lower} {if $payment.disabled}disabled{/if}
|
||||
{if $payment.exception}disabled exception{/if} {if $body.payment_id == $id or ($tpl_vars.delivery_collapsible and $payments|count == 1)}selected{/if}" data-cart="item"
|
||||
data-tracking-click-delivery-type='{get_gtm_data encode=true type='ecommerce' method='AddPaymentInfo' data=['payment' => $payment, 'method' => $method]}' >
|
||||
|
||||
<label for="pay{$id}" class="delivery-content custom-radio custom-control">
|
||||
<input type="radio" name="payment_id" value="{$id}" id="pay{$id}" class="custom-control-input"
|
||||
{if !$payment.exception}{if $body.payment_id == $id or ($tpl_vars.delivery_collapsible and $payments|count == 1)}checked{/if}{else}disabled data-exception="1"{/if}
|
||||
{if $payment.disabled}disabled{/if}>
|
||||
<span class="custom-control-indicator"></span>
|
||||
{if $payment.photo}
|
||||
<span class="img">{photo photo=$payment.photo alt=$payment.name}</span>
|
||||
{/if}
|
||||
|
||||
<span class="name">
|
||||
{$payment.name}
|
||||
<span data-reload="payment_exception_{$id}">
|
||||
{if $payment.exception}
|
||||
{block "exception-message"}
|
||||
<span class="subtitle">{$payment.exception->getShortMessage()}</span>
|
||||
{/block}
|
||||
{/if}
|
||||
</span>
|
||||
</span>
|
||||
|
||||
{block "delivery-payments-price"}
|
||||
<span class="price">
|
||||
<span data-reload="payment_price_{$id}">
|
||||
{$paymentPrice = $view->getPaymentPrice($id)}
|
||||
{if $paymentPrice != null}
|
||||
{if $paymentPrice.value_with_vat->isPositive()}
|
||||
{$paymentPrice.value_with_vat_no_rounding|format_price:"ceil=no;decimal=dynamic"}
|
||||
{else}
|
||||
{t}zdarma{/t}
|
||||
{/if}
|
||||
{/if}
|
||||
</span>
|
||||
</span>
|
||||
{/block}
|
||||
</label>
|
||||
|
||||
{if $payment.cart_description}
|
||||
<div class="payment_description" id="payment_description_{$payment.id}" style="display:none">
|
||||
{$payment.cart_description nofilter}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{else}
|
||||
{$special_payment = true}
|
||||
<div class="payment-item-{$payment.class.class|lower|strip_accent} {if $payment.disabled}disabled{/if}
|
||||
{if $payment.exception}disabled exception{/if}" data-cart="item">
|
||||
{get_smarty assign='smarty_object'}
|
||||
{$payment.class->getCartTitle($smarty_object) nofilter}
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block "payment-reset"}
|
||||
{if $tpl_vars.delivery_collapsible and ($payments|count > 1 or $special_payment)}
|
||||
<label for="pay_reset" class="delivery-reset-label">
|
||||
<input type="radio" name="payment_id" value="-1" id="pay_reset" data-payment-reset>
|
||||
<i class="fc icons_caret-left"></i>
|
||||
<span>{t}Změnit platbu{/t}</span>
|
||||
</label>
|
||||
{/if}
|
||||
{/block}
|
||||
24
web/templates/x/ordering/ordering.freedelivery.tpl
Normal file
24
web/templates/x/ordering/ordering.freedelivery.tpl
Normal file
@@ -0,0 +1,24 @@
|
||||
{if $freeDelivery or $body.freeShipping}
|
||||
<div data-reload="free-shipping">
|
||||
<p class="cart-free-shipping">
|
||||
{if $body.freeShipping} {* produkt s kampani doprava zdarma *}
|
||||
<strong>{t}Dopravu máte zdarma{/t}</strong>
|
||||
{else} {* nastaveni dopravy zdarma u dopravy nad xy Kč*}
|
||||
{$totalPriceForDelivery = $body->getTotalPriceForDelivery()->getPriceWithVat()}
|
||||
{if $freeDelivery->lessThan($totalPriceForDelivery)}
|
||||
<strong>{t}Dopravu máte zdarma{/t}</strong>
|
||||
{else}
|
||||
<strong>
|
||||
{t escape=false castka=$freeDelivery->sub($totalPriceForDelivery)|format_price}K dopravě zdarma zbývá nakoupit
|
||||
<span class="nowrap">za {castka}</span>{/t}
|
||||
</strong>
|
||||
{/if}
|
||||
{* nezobrazovat pokud je doprava zdarma 0 (viz Kerbo) *}
|
||||
{if $freeDelivery->isPositive()}
|
||||
{t escape=false castka=$freeDelivery|format_price}Doprava zdarma při objednávce
|
||||
<span class="nowrap">nad {castka}</span>{/t}
|
||||
{/if}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
80
web/templates/x/ordering/ordering.gdpr.tpl
Normal file
80
web/templates/x/ordering/ordering.gdpr.tpl
Normal file
@@ -0,0 +1,80 @@
|
||||
<div class="ordering-gdpr">
|
||||
{if $dbcfg.gdpr.enable == 'Y'}
|
||||
|
||||
{block "gdpr-text"}
|
||||
{if $tpl_vars.gdpr_checkbox}
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox" for="consent">
|
||||
<input type="checkbox" class="custom-control-input" name="consent" id="consent" required>
|
||||
<span class="custom-control-indicator"></span>
|
||||
{* @formatter:off *}
|
||||
{t escape=false urlTos={url s=page label='shopping-rules'} urlPrivacy={url s=page label='privacy_policy'}}
|
||||
Dokončením objednávky souhlasím s <a href="{urlTos}" target="_blank">obchodními podmínkami</a>,
|
||||
beru na vědomí <a href="{urlPrivacy}" target="_blank">zásady zpracování osobních údajů</a>
|
||||
a zavazuji se k platbě.{/t}
|
||||
{* @formatter:on *}
|
||||
</label>
|
||||
</div>
|
||||
{else}
|
||||
{* @formatter:off *}
|
||||
<p>
|
||||
{t escape=false urlTos={url s=page label='shopping-rules'} urlPrivacy={url s=page label='privacy_policy'}}Odesláním
|
||||
objednávky souhlasím s <a href="{urlTos}" target="_blank">Obchodními podmínkami</a>, beru na vědomí
|
||||
<a href="{urlPrivacy}" target="_blank">Zásady zpracování osobních údajů</a> a zavazuji se k platbě.{/t}
|
||||
</p>
|
||||
{* @formatter:on *}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block "only-digital-invoice"}
|
||||
{/block}
|
||||
|
||||
{block "ordering-newsletter-wrapper"}
|
||||
{if $dbcfg.newsletter.enable == "Y" and $ctrl.get_news != "Y"}
|
||||
{block "ordering-newsletter"}
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox" for="news">
|
||||
<input type="checkbox" class="custom-control-input" name="news" id="news">
|
||||
<span class="custom-control-indicator"></span>
|
||||
{* @formatter:off *}
|
||||
{t escape=false url={url s=page label='consent'}}Chci odebírat newsletter
|
||||
(a souhlasím se <a href="{url}" target="_blank">zpracováním os. údajů</a>){/t}
|
||||
{* @formatter:on *}
|
||||
</label>
|
||||
</div>
|
||||
{/block}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{if $dbcfg->analytics['heureka_overeno']['ID']}
|
||||
{block "ordering-heureka"}
|
||||
<div class="form-group checkbox">
|
||||
<label class="c-input c-checkbox custom-control custom-checkbox" for="heurekaDisagree">
|
||||
<input type="hidden" name="heurekaDisagree" value="0">
|
||||
<input type="checkbox" class="custom-control-input" name="heurekaDisagree" id="heurekaDisagree">
|
||||
<span class="c-indicator custom-control-indicator"></span>
|
||||
{t}Nesouhlasím se zasláním dotazníku spokojenosti, který pomáhá zlepšovat naše služby.{/t}
|
||||
</label>
|
||||
</div>
|
||||
{/block}
|
||||
{/if}
|
||||
{else}
|
||||
{* todo nastylovat *}
|
||||
<p>
|
||||
{* @formatter:off *}
|
||||
{t escape=false urlTos={url s=page label='shopping-rules'}}Stisknutím "Potvrdit objednávku"
|
||||
souhlasíte s <a href="{urlTos}" target="_blank">obchodními podmínkami</a>.
|
||||
{/t}
|
||||
{* @formatter:on *}
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="news" value="0">
|
||||
<label class="custom-control custom-checkbox">
|
||||
<input type="checkbox" name="news" class="custom-control-input" checked>
|
||||
<span class=" custom-control-indicator"></span>
|
||||
{t}Odebírat novinky{/t}
|
||||
</label>
|
||||
</div>
|
||||
{/if}
|
||||
{block "gdpr-custom-fields"}{/block}
|
||||
</div>
|
||||
69
web/templates/x/ordering/ordering.gifts.tpl
Normal file
69
web/templates/x/ordering/ordering.gifts.tpl
Normal file
@@ -0,0 +1,69 @@
|
||||
{if $product.product.gifts}
|
||||
{if !$image}
|
||||
{$image = 'product_gallery'}
|
||||
{/if}
|
||||
<div class="cart-product-sets">
|
||||
{get_product_gifts product=$product assign="gifts"}
|
||||
{foreach $gifts as $gift_product}
|
||||
{$gift_product->fetchImages($image)}
|
||||
<div class="set-item">
|
||||
<div class="set-label">
|
||||
{block 'set-label'}+ {t}dárek{/t}{/block}
|
||||
</div>
|
||||
|
||||
{block "set-image"}
|
||||
<a href="{url s=product IDproduct=$gift_product.id TITLE=$gift_product.title}" title="{t}Zobrazit produkt{/t}">
|
||||
<img src="{get_photo photo=$gift_product.image size=$image}" alt="{$gift_product.title}"
|
||||
width="{$cfg.Photo.types[$image].size[0]}" height="{$cfg.Photo.types[$image].size[1]}">
|
||||
</a>
|
||||
{/block}
|
||||
|
||||
{block 'set-title'}
|
||||
<a href="{url s=product IDproduct=$gift_product.id TITLE=$gift_product.title}" class="set-title">{if $gift_product.gift_pieces and $gift_product.gift_pieces > 1}{$gift_product.gift_pieces}x {/if}{$gift_product.title}</a>
|
||||
{/block}
|
||||
|
||||
{if $gift_product.selected_variation}
|
||||
<input type="hidden" name="products[{$product.idincart}][note][set_variation][{$gift_product.id}]"
|
||||
value="{$gift_product.selected_variation}">
|
||||
{elseif $gift_product.variationId || $gift_product.variationsIds}
|
||||
<div class="variations">
|
||||
{$variations = $gift_product->fetchVariations(true)}
|
||||
|
||||
{* Select first available or already preselected one *}
|
||||
{if $product.note.set_variation[$gift_product.id] > 0}
|
||||
{$id_selected = $product.note.set_variation[$gift_product.id]}
|
||||
{/if}
|
||||
<select class="form-control" name="products[{$product.idincart}][note][set_variation][{$gift_product.id}]">
|
||||
{foreach $variations.variations as $variation}
|
||||
{if $variation.in_store > 0}
|
||||
<option value="{$variation.id}" {if (!$id_selected and !$firstSelected) or ($id_selected == $variation.id)}selected{/if}>
|
||||
{foreach $variation.combinations as $index => $comb}
|
||||
{$variations.labels[$comb.id_label].values[$comb.id_value]}
|
||||
{/foreach}
|
||||
</option>
|
||||
{$firstSelected = true}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="set-price">
|
||||
<strong>{t}zdarma{/t}</strong>
|
||||
|
||||
{if $tpl_vars.optionalProductGifts}
|
||||
<div class="unwanted-gift">
|
||||
<input type="hidden" name="products[{$product.idincart}][note][gifts][{$gift_product.id}][unwanted]" value="0">
|
||||
<label class="custom-control custom-checkbox">
|
||||
<input type="checkbox" name="products[{$product.idincart}][note][gifts][{$gift_product.id}][unwanted]"
|
||||
value="1" {if $product.note.gifts[$gift_product.id].unwanted}checked{/if} class="custom-control-input">
|
||||
<span class="custom-control-indicator"></span>
|
||||
{t}Nechci dárek{/t}
|
||||
</label>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
32
web/templates/x/ordering/ordering.header.tpl
Normal file
32
web/templates/x/ordering/ordering.header.tpl
Normal file
@@ -0,0 +1,32 @@
|
||||
{* @compiler:inline-only *}
|
||||
<header class="header header-ordering">
|
||||
<div class="container-fluid display-flex">
|
||||
<a href="{url s=index}" title="{$dbcfg.index_title}" class="link-back">
|
||||
{t}Pokračovat v nákupu{/t}
|
||||
</a>
|
||||
|
||||
<a href="{url s=index}" title="{$dbcfg.index_title}" class="logo">
|
||||
<img src="{static_url url="/templates/images/logo.svg"}" class="img-responsive" alt="{$dbcfg.index_title}">
|
||||
</a>
|
||||
|
||||
<div class="header-icons">
|
||||
{* pokud tohle odkopíruješ, smaž `ifmodule` a nech jen tu verzi, co používáš (JS nebo klasik) *}
|
||||
{* košík zde není naschvál, nechceme řešit vzájemnou interakci velkého a malého košíku *}
|
||||
{ifmodule "JS_SHOP"}
|
||||
<div class="header-login header-icon" id="js-shop-user">
|
||||
<a href="{url s=login}" class="cart-signin">
|
||||
<span class="fc icons_user"></span>
|
||||
</a>
|
||||
</div>
|
||||
{elsemodule}
|
||||
<div class="header-login header-icon {if !$ctrl.logged}cart-signin{/if}">
|
||||
<a href="{if !$ctrl.logged}{url s=login}{else}{url s=account}{/if}">
|
||||
<span class="fc icons_user"></span>
|
||||
<span>{if !$ctrl.logged}{t}Přihlásit{/t}{else}{t}Můj účet{/t}{/if}</span>
|
||||
</a>
|
||||
</div>
|
||||
{insert_cart_info hide_box=true}
|
||||
{/ifmodule}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
120
web/templates/x/ordering/ordering.pricebox.tpl
Normal file
120
web/templates/x/ordering/ordering.pricebox.tpl
Normal file
@@ -0,0 +1,120 @@
|
||||
<div data-reload="price">
|
||||
{if $module.ORDER_DISCOUNT && ($body->getPurchaseState()->getDiscounts() || $body->getPurchaseState()->getCharges())}
|
||||
{$cartDiscountActive = true}
|
||||
{/if}
|
||||
|
||||
{$totalPrice = $body->getPurchaseState()->getTotalPrice()}
|
||||
{$productsTotalPrice = $body->getPurchaseState()->getProductsTotalPrice()}
|
||||
|
||||
<div class="price-box">
|
||||
{block "products-price"}
|
||||
{if $transport==1 or $cartDiscountActive}
|
||||
<div class="price-box-row">
|
||||
<p>{t}Cena zboží{/t}</p>
|
||||
<p>
|
||||
{$discountsProductsTotalPrice = $body->getPurchaseState()->discountsProductsTotalPrice}
|
||||
{* discountsProducts - napr. darky, jsou vetsinou zdarma, ale mohou byt i za nejakou cenu *}
|
||||
{* cena darku neni zapoctena v totalPrice *}
|
||||
{$productsTotalPriceIncrement = 0}
|
||||
{if $discountsProductsTotalPrice}
|
||||
{if $noVat}
|
||||
{$productsTotalPriceIncrement = $discountsProductsTotalPrice->getPriceWithoutVat()}
|
||||
{else}
|
||||
{$productsTotalPriceIncrement = $discountsProductsTotalPrice->getPriceWithVat()}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if $noVat}
|
||||
{$productsTotalPrice->getPriceWithoutVat()->add($productsTotalPriceIncrement)|format_price:"ceil=no;decimal=dynamic"}
|
||||
{else}
|
||||
{$productsTotalPrice->getPriceWithVat()->add($productsTotalPriceIncrement)|format_price:"ceil=no;decimal=dynamic"}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block "pricebox-discounts"}
|
||||
{* 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->getPriceWithoutVat()|format_price:"ceil=no;decimal=dynamic"}
|
||||
{else}{$discount->getPriceWithVat()|format_price:"ceil=no;decimal=dynamic"}{/if}</p>
|
||||
</div>
|
||||
{/block}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block "pricebox-charges"}
|
||||
{if $body->getPurchaseState()->getCharges()}
|
||||
{foreach $body->getPurchaseState()->getCharges() as $charge}
|
||||
{if is_a($charge, 'KupShop\OrderingBundle\Entity\Purchase\ChargePurchaseItem')}
|
||||
<div class="price-box-row charge">
|
||||
<p>{$charge->getName()}</p>
|
||||
<p>{$charge->getPrice()|format_price:"ceil=no;decimal=dynamic"}</p>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block "pricebox-transport"}
|
||||
{if $transport==1}
|
||||
<div class="price-box-row">
|
||||
{if !$body.transport}
|
||||
<p>
|
||||
{if !$body.delivery_id}{t}Vyberte dopravu{/t}{else}{t}Vyberte platbu{/t}{/if}
|
||||
</p>
|
||||
{else}
|
||||
<p>{t}Doprava a platba{/t}</p>
|
||||
<p>
|
||||
{$delivery = $body->getDeliveryType()}
|
||||
{if $noVat}{$delivery.price.value_without_vat|format_price:"ceil=no;decimal=dynamic"}{else}{$delivery.price.value_with_vat|format_price:"ceil=no;decimal=dynamic"}{/if}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{if ($body->getPurchaseState()->getCustomData('rounding_balance') && $dbcfg.invoice_rounding_balance == 'Y')}
|
||||
<div class="price-box-row">
|
||||
<p>{t}Zaokrouhlení{/t}</p>
|
||||
<p>{$body->getPurchaseState()->getCustomData('rounding_balance')|format_price:"ceil=no;decimal=dynamic"}</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{block "pricebox-cartsaving"}
|
||||
{if $tpl_vars.pricebox_cartsaving}
|
||||
{get_cart_savings assign='cartSavings'}
|
||||
{if $cartSavings->isPositive()}
|
||||
<div class="price-box-row price-box-row-cartsaving">
|
||||
<p>{t}Ušetříte{/t}</p>
|
||||
<p>{$cartSavings|format_price:"ceil=no;decimal=dynamic"}</p>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block "pricebox-without-vat"}
|
||||
{if $dbcfg.shop_vat_payer == "Y" or $isB2BUser}
|
||||
<div class="price-box-row">
|
||||
<p>{t}Celková částka bez DPH{/t}</p>
|
||||
<p>{$totalPrice->getPriceWithoutVat()|format_price:"ceil=no;decimal=dynamic"}</p>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block "pricebox-total"}
|
||||
<div class="price-box-row total-price">
|
||||
<p>{if $dbcfg.shop_vat_payer == "Y"}{t}Celková částka s DPH{/t}{else}{t}Celková částka{/t}{/if}</p>
|
||||
<p>{$totalPrice->getPriceWithVat()|format_price:"ceil=no;decimal=dynamic"}</p>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
19
web/templates/x/ordering/ordering.process.tpl
Normal file
19
web/templates/x/ordering/ordering.process.tpl
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="order-process">
|
||||
{$visited = true}
|
||||
{foreach $body.steps as $stepName => $step}
|
||||
{if $stepName == $body.stepName}{$visited = false}{/if}
|
||||
{if $visited}
|
||||
<a href="/{$step.url}" class="order-process-step visited">
|
||||
{$step.title nofilter}
|
||||
</a>
|
||||
{else}
|
||||
<div class="order-process-step {if $step.selected}active{/if}">
|
||||
{$step.title nofilter}
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
<div class="order-process-step order-process-laststep{if $last_step} active{/if}">
|
||||
{t}Odesláno{/t}
|
||||
</div>
|
||||
</div>
|
||||
53
web/templates/x/ordering/ordering.product-charges.tpl
Normal file
53
web/templates/x/ordering/ordering.product-charges.tpl
Normal file
@@ -0,0 +1,53 @@
|
||||
{* @compiler:inline-only *}
|
||||
{if $item.product}
|
||||
{if $charges = $item.product->fetchCharges()}
|
||||
<div class="cart-product-charges">
|
||||
{foreach $charges as $charge}
|
||||
{if $charge.figure == 'N'}{continue}{/if}
|
||||
{if $isCart}
|
||||
<label class="charge-item custom-control custom-checkbox {if $charge.required == "Y"}disabled{/if}">
|
||||
<input type="hidden" name="products[{$product.idincart}][note][charges][{$charge.id}]" value="N">
|
||||
<input type="checkbox" name="products[{$product.idincart}][note][charges][{$charge.id}]" value="Y" class="custom-control-input" data-charge-input
|
||||
{if $item.note.charges[$charge.id] == 'Y'}checked{/if}>
|
||||
<span class="custom-control-indicator"></span>
|
||||
{if $charge.product}
|
||||
{get_photos type='products' id=$charge.product.id assign='product_photos'}
|
||||
<span class="charge-title">+</span>
|
||||
<a class="charge-product" href="{url s=product IDproduct=$charge.product.id TITLE=$charge.product.title}">
|
||||
<div class="img">
|
||||
<img src="{get_photo photo=$product_photos[0] size='product_cart'}"
|
||||
alt="{$charge.product.title}" width="{$cfg.Photo.types.product_cart.size[0]}"
|
||||
height="{$cfg.Photo.types.product_cart.size[1]}" class="img-responsive">
|
||||
</div>
|
||||
{block "charge-product-title"}
|
||||
<span class="product-title">{$charge.product.title}</span>
|
||||
{/block}
|
||||
</a>
|
||||
{else}
|
||||
<span class="charge-title">{$charge.title|default:$charge.admin_title}</span>
|
||||
{/if}
|
||||
<strong class="charge-price">{$charge.price|format_price}</strong>
|
||||
{if $charge.descr}
|
||||
<i class="fc icons_tooltip charge-tooltip">
|
||||
<span class="wpj-tooltip">{$charge.descr|strip_tags}</span>
|
||||
</i>
|
||||
{/if}
|
||||
</label>
|
||||
{elseif $item.note.charges[$charge.id] == 'Y'}
|
||||
<p class="charge-item">
|
||||
<span>
|
||||
{$charge.title|default:$charge.admin_title}{if $item.note.charges_notes[$charge.id]}: <strong>{$item.note.charges_notes[$charge.id]}</strong>{/if}
|
||||
<span class="charge-price">
|
||||
{$charge.price->getPriceWithVat()|format_price}
|
||||
</span>
|
||||
</span>
|
||||
|
||||
{if !$hideDelete}
|
||||
<a href="{url s=cart}?act=recount&products[{$item.id}][note][charges][{$charge.id}]=N" class="fc icons_trash delete-charge" data-cart="charge-delete"></a>
|
||||
{/if}
|
||||
</p>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
183
web/templates/x/ordering/ordering.products.tpl
Normal file
183
web/templates/x/ordering/ordering.products.tpl
Normal file
@@ -0,0 +1,183 @@
|
||||
{* @compiler:inline-only *}
|
||||
<div data-reload="cart">
|
||||
{block 'product-multifetch-block'}{/block}
|
||||
{ifmodule PRODUCT_GIFTS}
|
||||
{$body.productList->fetchGifts()}
|
||||
{/ifmodule}
|
||||
{ifmodule PRODUCT_SETS}
|
||||
{$body.productList->fetchSets()}
|
||||
{/ifmodule}
|
||||
{ifmodule PRODUCTS_CHARGES}
|
||||
{$body.productList->fetchCharges()}
|
||||
{/ifmodule}
|
||||
{if $body.products}
|
||||
<div class="order-products order-products-cart">
|
||||
{$img_size = "product_gallery"}
|
||||
{if isset($cfg.Photo.types["product_cart"])}{$img_size = "product_cart"}{/if}
|
||||
{$photo_dimensions = $cfg.Photo.types["product_cart"].size}
|
||||
|
||||
{foreach $body.products as $product}
|
||||
<div class="product" data-cart="row" data-product-id="{$product.id}{if $product.id_variation}_{$product.id_variation}{/if}">
|
||||
<div class="image">
|
||||
<a href="{url s=product IDproduct=$product.id TITLE=$product.title}" title="{t}Zobrazit produkt{/t}">
|
||||
{block 'image'}
|
||||
<img src="{get_photo photo=$product.image size=$img_size}" alt="{$product.title}"
|
||||
class="img-responsive" width="{$photo_dimensions[0]}" height="{$photo_dimensions[1]}">
|
||||
{/block}
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">
|
||||
{block 'title'}
|
||||
<a href="{url s=product IDproduct=$product.id TITLE=$product.title}{if $product.id_variation}#{$product.id_variation}{/if}"
|
||||
title="{t}Zobrazit produkt{/t}">{$product.product.title}</a>
|
||||
{if $product.id_variation}
|
||||
<span class="variation">{$product.product.variationTitle}</span>
|
||||
{/if}
|
||||
{if $product.product and $product.note}
|
||||
<span class="variation">{$product.product->printNote($product.note)}</span>
|
||||
{/if}
|
||||
<div class="availability-resp">
|
||||
{printAvailability}
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
{block "availability"}
|
||||
<div class="availability">
|
||||
{printAvailability}
|
||||
</div>
|
||||
{/block}
|
||||
{block "piece-price"}
|
||||
<div class="piece-price">
|
||||
{$product.price.value_with_vat|format_price} / {$product.product.unit.short_name|default:"{t}ks{/t}"}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block "pieces"}
|
||||
<div class="pieces">
|
||||
{$step = $product.product.unit.step|default:1}
|
||||
|
||||
{ifmodule PRODUCTS__STEP}
|
||||
{$data = $product.product->getData()}
|
||||
{$step = $data.step|default:$step}
|
||||
{/ifmodule}
|
||||
|
||||
<input type="number" name="products[{$product.idincart}][pieces]"
|
||||
value="{$product.pieces|string_format:"%.{$product.product.unit.pieces_precision|default:0}f"}"
|
||||
class="form-control" step="{$step}" min="{$step}" data-bv-excluded="true"
|
||||
data-cart="pieces"
|
||||
{if $module.PRODUCTS__UNITS_FLOAT}
|
||||
data-precision="{$product.product.unit.pieces_precision|default:0}"
|
||||
{/if}
|
||||
>
|
||||
<div class="buy_count">
|
||||
<button type="button" class="fc plus" title="{t mnozstvi=$step}Přidat {mnozstvi} ks{/t}" data-cart="plus"
|
||||
data-tracking-click='{get_gtm_data encode=true type='ecommerce' method='ClickAddToCart' data=['product' => $product.product, 'quantity' => $step, 'listType' => 'cart']}'
|
||||
></button>
|
||||
<button type="button" class="fc minus" title="{t mnozstvi=$step}Odebrat {mnozstvi} ks{/t}" data-cart="minus"
|
||||
data-tracking-click='{get_gtm_data encode=true type='ecommerce' method='ClickRemoveFromCart' data=['product' => $product.product, 'quantity' => $step]}'
|
||||
></button>
|
||||
{if $module.PRODUCTS__UNITS_FLOAT}
|
||||
<p class="ordering-product-units">{$product.product.unit.short_name|lower}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block "price-total"}
|
||||
{if $tpl_vars.ordering_products_discount}
|
||||
<div class="price-total price-total-with-discount {if $isB2BUser}price-total-discount-b2b{/if}">
|
||||
{calc_product_discount product=$product.product assign='product_discount'}
|
||||
{if $product_discount.discount->isPositive() and $product_discount.discount->asFloat() >= 1}
|
||||
<span class="flag flag-discount">
|
||||
-{$product_discount.discount->asFloat()|round}%
|
||||
</span>
|
||||
{/if}
|
||||
<div>
|
||||
{if $product_discount.priceOriginal}
|
||||
<del class="strike-price">{$product_discount.priceOriginal.value_with_vat->mul(toDecimal($product.pieces))|format_price}</del>
|
||||
{/if}
|
||||
|
||||
{if $isB2BUser}
|
||||
<strong>{$product.totalPrice.value_without_vat|format_price}<br><small>{t}bez DPH{/t}</small></strong>
|
||||
{else}
|
||||
<strong>{$product.totalPrice.value_with_vat|format_price}</strong>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="price-total">
|
||||
{if $isB2BUser}
|
||||
{$product.totalPrice.value_without_vat|format_price:"ceil=no;decimal=dynamic"}
|
||||
{else}
|
||||
{$product.totalPrice.value_with_vat|format_price:"ceil=no;decimal=dynamic"}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block "delete"}
|
||||
<a href="{url s=cart act=erase IDInCart=$product.idincart}" class="delete-product"
|
||||
data-tracking-click='{get_gtm_data encode=true type='ecommerce' method='ClickRemoveFromCart' data=['product' => $product.product, 'quantity' => $product.pieces]}'
|
||||
title="{t}Odebrat produkt z košíku{/t}" data-cart="delete">
|
||||
<span class="fc"></span>
|
||||
</a>
|
||||
{/block}
|
||||
{block "product-sets-custom"}{/block}
|
||||
</div>
|
||||
|
||||
{block "product-charges"}
|
||||
{ifmodule PRODUCTS_CHARGES}
|
||||
{include "ordering/ordering.product-charges.tpl" item=$product isCart=true}
|
||||
{/ifmodule}
|
||||
{/block}
|
||||
|
||||
{block "product-sets"}
|
||||
{ifmodule PRODUCT_SETS}
|
||||
{include "ordering/ordering.sets.tpl"}
|
||||
{/ifmodule}
|
||||
{ifmodule PRODUCT_GIFTS}
|
||||
{include "ordering/ordering.gifts.tpl"}
|
||||
{/ifmodule}
|
||||
{/block}
|
||||
{/foreach}
|
||||
</div>
|
||||
{block "ordering-charges"}{/block}
|
||||
{* Slevy na plnou šířku *}
|
||||
{block "cart-discounts-full"}
|
||||
<div data-reload="cart-discounts-full">
|
||||
{ifmodule ORDER_DISCOUNT}
|
||||
{insert_discounts_actions cart=$body type='full' new_structure=true assign='discountsActions'}
|
||||
{foreach $discountsActions as $discountAction}
|
||||
{$discountAction.content nofilter}
|
||||
{/foreach}
|
||||
{/ifmodule}
|
||||
</div>
|
||||
{/block}
|
||||
{if $tpl_vars.cart_sidebar}
|
||||
{block "shipping-progress-wrapper"}
|
||||
<div class="shipping-progress-wrapper">
|
||||
{block "shipping-progress"}
|
||||
{include "components/shipping-progress.tpl" fonticon='icons_package' cartPrice=$body->getTotalPriceForDelivery()->getPriceWithVat(false)}
|
||||
{/block}
|
||||
|
||||
{ifmodule BONUS_PROGRAM}
|
||||
{include "bonus-program/bonus-program-cart.tpl"}
|
||||
{/ifmodule}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block "cart-discounts-half"}
|
||||
{ifmodule ORDER_DISCOUNT}
|
||||
{insert_discounts_actions cart=$body type=['products', 'half'] assign='discountsActions'}
|
||||
{foreach $discountsActions as $discountAction}
|
||||
{$discountAction nofilter}
|
||||
{/foreach}
|
||||
{/ifmodule}
|
||||
{/block}
|
||||
{/if}
|
||||
{else}
|
||||
<p class="alert alert-info">{t}Váš košík je prázdný :({/t}</p>
|
||||
{/if}
|
||||
|
||||
{block "cart-products-append"}{/block}
|
||||
</div>
|
||||
55
web/templates/x/ordering/ordering.sets.tpl
Normal file
55
web/templates/x/ordering/ordering.sets.tpl
Normal file
@@ -0,0 +1,55 @@
|
||||
{if $product.sets}
|
||||
{if !$image}
|
||||
{$image = 'product_gallery'}
|
||||
{/if}
|
||||
<div class="cart-product-sets">
|
||||
<h3>{t}Skládá se z{/t}:</h3>
|
||||
{foreach $product.sets as $set_product}
|
||||
{$set_product->fetchImages($image)}
|
||||
<div class="set-item">
|
||||
<a href="{url s=product IDproduct=$set_product.id TITLE=$set_product.title}" title="{t}Zobrazit produkt{/t}">
|
||||
<img src="{get_photo photo=$set_product.image size=$image}" alt="{$set_product.title}"
|
||||
width="{$cfg.Photo.types[$image].size[0]}" height="{$cfg.Photo.types[$image].size[1]}">
|
||||
</a>
|
||||
|
||||
<a href="{url s=product IDproduct=$set_product.id TITLE=$set_product.title}" class="set-title">{$set_product.title}</a>
|
||||
|
||||
{$item_name = "products[{$product.idincart}][note][set_variation][{$set_product.id}][{$set_product.set_id}]"}
|
||||
{if $set_product.selected_variation}
|
||||
<input type="hidden" name="{$item_name}" value="{$set_product.selected_variation}">
|
||||
{elseif $set_product.variationId}
|
||||
<div class="variations">
|
||||
{$variations = $set_product->fetchVariations(true)}
|
||||
|
||||
{* Select first available or already preselected one *}
|
||||
{$id_selected = null}
|
||||
{$firstSelected = false}
|
||||
{$set_variation = $product.note.set_variation[$set_product.id]}
|
||||
{if $set_variation && is_array($set_variation)}
|
||||
{$set_variation = $set_variation[$set_product.set_id]}
|
||||
{/if}
|
||||
{if $set_variation > 0}
|
||||
{$id_selected = $set_variation}
|
||||
{/if}
|
||||
|
||||
{foreach $variations.variations as $variation}
|
||||
{if $variation.in_store > 0}
|
||||
<label class="custom-control custom-radio">
|
||||
<input type="radio" name="{$item_name}"
|
||||
value="{$variation.id}" class="custom-control-input"
|
||||
{if (!$id_selected and !$firstSelected) or $id_selected == $variation.id}checked{/if}>
|
||||
<span class="custom-control-indicator"></span>
|
||||
{$firstSelected = true}
|
||||
|
||||
{foreach $variation.combinations as $index => $comb}
|
||||
{$variations.labels[$comb.id_label].values[$comb.id_value]}
|
||||
{/foreach}
|
||||
</label>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
97
web/templates/x/ordering/ordering.summary-sidebar.tpl
Normal file
97
web/templates/x/ordering/ordering.summary-sidebar.tpl
Normal file
@@ -0,0 +1,97 @@
|
||||
{* @compiler:inline-only *}
|
||||
{if $cfg.tpl.summary_sidebar.version == 2}
|
||||
{include "ordering/ordering.summary-sidebar.v2.tpl"}
|
||||
{else}
|
||||
{block 'sidebar-prepend'}{/block}
|
||||
<div class="summary-sidebar">
|
||||
|
||||
{block "user-manager-select"}
|
||||
{ifmodule USER_MANAGER}
|
||||
{if $ctrl.logged and $body.stepName == 'cart'}
|
||||
{$users_select_title = "{t}Vyberte pobočku{/t}"}
|
||||
{user_manager_insert_users_select title=$users_select_title activeOnly=true}
|
||||
{/if}
|
||||
{/ifmodule}
|
||||
{/block}
|
||||
|
||||
{if $body.stepName != 'cart'}
|
||||
{$totalCount = 0}
|
||||
{foreach $body.products as $item}
|
||||
{$totalCount = $totalCount + $item.pieces}
|
||||
{/foreach}
|
||||
{block "sidebar-title"}
|
||||
<p class="title-default"{if $body.products|count > 5} data-opener="[data-summary-sidebar-products]"{/if}>{t}Souhrn objednávky{/t}
|
||||
<span>{$totalCount} {t}ks{/t}</span></p>
|
||||
{/block}
|
||||
|
||||
{if $isLastStep}
|
||||
<p class="check-order-msg">{t}Překontrolujte si košík a odešlete objednávku.{/t}</p>
|
||||
{/if}
|
||||
|
||||
{block "sidebar-products"}
|
||||
<div {if $body.products|count > 5}data-summary-sidebar-products data-simplebar data-simplebar-auto-hide="false"{/if}>
|
||||
<div class="summary-sidebar-productlist">
|
||||
<div class="summary-sidebar-productlist-inner">
|
||||
{if $body.products}
|
||||
{include "ordering/ordering.summary.products.tpl" items=$body.products|array_reverse}
|
||||
{else}
|
||||
<p class="no-items">{t}V košíku nemáte žádné zboží.{/t}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{/if}
|
||||
|
||||
{block "sidebar-delivery"}
|
||||
{if $deliveryType}
|
||||
<div class="summary-sidebar-delivery-wrapper">
|
||||
{$delivery = $deliveryType->getDelivery()}
|
||||
<div class="summary-sidebar-delivery">
|
||||
{if $delivery}
|
||||
{get_deliveries_dates cart=$body assign='deliveriesDates'}
|
||||
{$date = $deliveriesDates[$delivery.id].date}
|
||||
<p class="title">{t}Doprava{/t}</p>
|
||||
<p>
|
||||
{$delivery.name}
|
||||
{if $date and $delivery->isInPerson()}
|
||||
- {t escape=false}k vyzvednutí{/t} {$date|format_date_locale_pretty:'d. L. Y'}
|
||||
{elseif $date}
|
||||
- {t}předpokládané doručení{/t} {$date|format_date_locale_pretty:'d. L. Y'}
|
||||
{/if}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
{$payment = $deliveryType->getPayment()}
|
||||
<div class="summary-sidebar-delivery">
|
||||
<p class="title">{t}Platba{/t}</p>
|
||||
{if $payment}
|
||||
{$method = $payment->getSelectedMethod()}
|
||||
{if $method}
|
||||
<p>{$method.name nofilter}</p>
|
||||
{else}
|
||||
<p>{$payment->getName() nofilter}</p>
|
||||
{/if}
|
||||
{else}
|
||||
<p>{$deliveryType->payment}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block "sidebar-voucher"}
|
||||
{if !$tpl_vars.voucher_in_first_step and $show_voucher}
|
||||
{include "ordering/ordering.voucher.tpl"}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block "sidebar-pricebox"}
|
||||
{include "ordering/ordering.pricebox.tpl" transport=($body.stepName != 'cart')}
|
||||
|
||||
{if $tpl_vars.btns_in_sidebar}
|
||||
{include "ordering/ordering.btns.sidebar.tpl" showVoucher=($body.stepName == 'cart')}
|
||||
{/if}
|
||||
{/block}
|
||||
</div>
|
||||
{/if}
|
||||
125
web/templates/x/ordering/ordering.summary-sidebar.v2.tpl
Normal file
125
web/templates/x/ordering/ordering.summary-sidebar.v2.tpl
Normal file
@@ -0,0 +1,125 @@
|
||||
{* @compiler:inline-only *}
|
||||
{block 'sidebar-prepend'}{/block}
|
||||
<div class="summary-sidebar">
|
||||
{$totalCount = 0}
|
||||
{foreach $body.products as $item}
|
||||
{$totalCount = $totalCount + $item.pieces}
|
||||
{/foreach}
|
||||
{block "sidebar-title"}
|
||||
<p class="title-default"{if $body.products|count > 5} data-opener="[data-summary-sidebar-products]"{/if}>{t}Shrnutí{/t}
|
||||
{if $body.stepName == 'cart'}
|
||||
<span data-cart-voucher>
|
||||
<a href="" data-voucher-show>{t}Vložit slevový kód{/t}</a>
|
||||
</span>
|
||||
{else}
|
||||
<span>{$totalCount} {t}ks{/t}</span>
|
||||
{/if}
|
||||
</p>
|
||||
{if $body.stepName == 'cart'}
|
||||
{include "ordering/ordering.voucher.tpl" hidden=true}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block "user-manager-select"}
|
||||
{ifmodule USER_MANAGER}
|
||||
{if $ctrl.logged and $body.stepName == 'cart'}
|
||||
{$users_select_title = "{t}Vyberte pobočku{/t}"}
|
||||
{user_manager_insert_users_select title=$users_select_title activeOnly=true}
|
||||
{/if}
|
||||
{/ifmodule}
|
||||
{/block}
|
||||
{if $body.stepName != 'cart'}
|
||||
{block "sidebar-products"}
|
||||
<div {if $body.products|count > 5}data-summary-sidebar-products data-simplebar data-simplebar-auto-hide="false"{/if}>
|
||||
<div class="summary-sidebar-productlist">
|
||||
<div class="summary-sidebar-productlist-inner">
|
||||
{if $body.products}
|
||||
{include "ordering/ordering.summary.products.tpl" items=$body.products|array_reverse}
|
||||
{else}
|
||||
<p class="no-items">{t}V košíku nemáte žádné zboží.{/t}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{/if}
|
||||
|
||||
{block "sidebar-delivery"}
|
||||
{if $deliveryType}
|
||||
<div class="summary-sidebar-delivery-wrapper">
|
||||
{$delivery = $deliveryType->getDelivery()}
|
||||
<div class="summary-sidebar-delivery">
|
||||
{if $delivery}
|
||||
{get_deliveries_dates cart=$body assign='deliveriesDates'}
|
||||
{$date = $deliveriesDates[$delivery.id].date}
|
||||
<p class="title">
|
||||
{$delivery.name}
|
||||
{if $date and $delivery->isInPerson()}
|
||||
<br>
|
||||
<span class="info">{t escape=false}k vyzvednutí{/t} {$date|format_date_locale_pretty:'d. L. Y'}</span>
|
||||
{elseif $date}
|
||||
<br>
|
||||
<span class="info">{t}předpokládané doručení{/t} {$date|format_date_locale_pretty:'d. L. Y'}</span>
|
||||
{/if}
|
||||
</p>
|
||||
<p class="price">
|
||||
{$delivery.price.value_with_vat|format_price}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
{$payment = $deliveryType->getPayment()}
|
||||
<div class="summary-sidebar-delivery">
|
||||
<p class="title">
|
||||
{if $payment}
|
||||
{$method = $payment->getSelectedMethod()}
|
||||
{if $method}
|
||||
{$method.name nofilter}
|
||||
{else}
|
||||
{$payment->getName() nofilter}
|
||||
{/if}
|
||||
{else}
|
||||
{$deliveryType->payment}
|
||||
{/if}
|
||||
</p>
|
||||
<p class="price">
|
||||
{$paymentPrice = $view->getPaymentPrice($payment.id)}
|
||||
{if $paymentPrice != null}
|
||||
{if $paymentPrice.value_with_vat->isPositive()}
|
||||
{$paymentPrice.value_with_vat|format_price}
|
||||
{else}
|
||||
{t}zdarma{/t}
|
||||
{/if}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
<div class="summary-sidebar-inner">
|
||||
{block "sidebar-pricebox"}
|
||||
{include "ordering/ordering.pricebox.tpl" transport=($body.stepName != 'cart')}
|
||||
|
||||
{if $isLastStep}
|
||||
{ifmodule AGE_VERIFY}
|
||||
{if $dbcfg.age_verify.adulto.enabled}
|
||||
<div class="adulto-cz" data-sitekey="{$dbcfg.age_verify.adulto.public_key}"></div>
|
||||
<input type="hidden" name="customer_age" value="18" data-adultocz="customer_age">
|
||||
{/if}
|
||||
{/ifmodule}
|
||||
<p class="check-order-msg">{t}Překontrolujte si košík a odešlete objednávku.{/t}</p>
|
||||
{/if}
|
||||
|
||||
{if $tpl_vars.btns_in_sidebar}
|
||||
{include "ordering/ordering.btns.sidebar.tpl" showVoucher=false}
|
||||
{/if}
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{block "js-dynamic-load" append}
|
||||
{ifmodule AGE_VERIFY}
|
||||
{if $dbcfg.age_verify.adulto.enabled}
|
||||
<script async src="https://api.js.m2a.cz/api.js"></script>
|
||||
{/if}
|
||||
{/ifmodule}
|
||||
{/block}
|
||||
29
web/templates/x/ordering/ordering.summary.charges.tpl
Normal file
29
web/templates/x/ordering/ordering.summary.charges.tpl
Normal file
@@ -0,0 +1,29 @@
|
||||
{if $body->getPurchaseState()->getCharges()}
|
||||
{foreach $body->getPurchaseState()->getCharges() as $charge}
|
||||
{if is_a($charge, 'KupShop\OrderingBundle\Entity\Purchase\ProductPurchaseItem')}
|
||||
{$product = $charge->getProduct()}
|
||||
{if $product}
|
||||
{$product->fetchImages(4)}
|
||||
<div class="product">
|
||||
<div class="image">
|
||||
<a href="{url s=product IDproduct=$product.id TITLE=$product.title}" title="{t}Zobrazit produkt{/t}">
|
||||
<img src="{get_photo photo=$product.image size=4}" alt="{$product.title}"
|
||||
class="img-responsive">
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">
|
||||
<a href="{url s=product IDproduct=$product.id TITLE=$product.title}"
|
||||
title="{t}Zobrazit produkt{/t}">{$charge->getName()}</a>
|
||||
<span class="variation">{$product.variationTitle}</span>
|
||||
</div>
|
||||
<div class="price-summary">
|
||||
<p class="price-total price-total-summary">
|
||||
{$charge->getPrice()|format_price:"ceil=no;decimal=dynamic"}
|
||||
</p>
|
||||
<p class="pieces-summary"> </p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
48
web/templates/x/ordering/ordering.summary.gift.tpl
Normal file
48
web/templates/x/ordering/ordering.summary.gift.tpl
Normal file
@@ -0,0 +1,48 @@
|
||||
{$gifts = $body->getPurchaseState()->getCustomData('gift')}
|
||||
{$selected_products = []}
|
||||
{foreach $gifts as $discountId => $selectedGifts}
|
||||
{$tmp_selected = array_filter(array_column($selectedGifts, 'id_product'))}
|
||||
{if $tmp_selected}
|
||||
{$selected_products = array_merge($selected_products, $tmp_selected)}
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
{if $selected_products}
|
||||
{foreach $body->getPurchaseState()->getDiscountHandlers() as $handler}
|
||||
{$data = $handler->getData()}
|
||||
{* Pokud jsou varianty, `id_product` je id produktu a `gift` je id varianty.
|
||||
Bez variant je jen `gift` = id produktu. *}
|
||||
{$gift = $data['id_product']|default:$data['gift']}
|
||||
{if $gift and in_array($gift, $selected_products)}
|
||||
{$vars = $handler->getVars()}
|
||||
{$product = $vars['products'][$gift]}
|
||||
|
||||
{if $product}
|
||||
{$product->fetchImages(4)}
|
||||
{$gift_variations = $product->variations}
|
||||
<div class="product">
|
||||
<div class="image">
|
||||
<a href="{url s=product IDproduct=$product.id TITLE=$product.title}" title="{t}Zobrazit produkt{/t}">
|
||||
<img src="{get_photo photo=$product.image size=4}" alt="{$product.title}"
|
||||
class="img-responsive">
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">
|
||||
<span class="variation">{$vars.title|default:"{t}Dárek zdarma{/t}"}</span>
|
||||
<a href="{url s=product IDproduct=$product.id TITLE=$product.title}"
|
||||
title="{t}Zobrazit produkt{/t}">{$product.title}</a>
|
||||
{if $gift_variations[$data.gift]}
|
||||
<span class="variation">{$gift_variations[$data.gift].title}</span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="price-summary">
|
||||
<p class="price-total price-total-summary">
|
||||
<strong class="summary-gift-price">{if $vars.price && $vars.price->getPriceWithVat()->isZero()}{t}zdarma{/t}{else}{$vars.price|format_price}{/if}</strong>
|
||||
</p>
|
||||
<p class="pieces-summary">{$vars.data.gift_pieces|default:1} {t}ks{/t}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
123
web/templates/x/ordering/ordering.summary.products.tpl
Normal file
123
web/templates/x/ordering/ordering.summary.products.tpl
Normal file
@@ -0,0 +1,123 @@
|
||||
{* @compiler:inline-only *}
|
||||
{if $body.products}
|
||||
{ifmodule PRODUCT_GIFTS}
|
||||
{$body.productList->fetchGifts()}
|
||||
{/ifmodule}
|
||||
<div class="order-products order-products-summary">
|
||||
{foreach $body.products as $product}
|
||||
<div class="product">
|
||||
<div class="image">
|
||||
<a href="{url s=product IDproduct=$product.id TITLE=$product.title}"
|
||||
title="{t}Zobrazit produkt{/t}">
|
||||
{block 'image'}
|
||||
<img src="{get_photo photo=$product.image size=4}" alt="{$product.title}"
|
||||
class="img-responsive">
|
||||
{/block}
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">
|
||||
{block 'title'}
|
||||
<a href="{url s=product IDproduct=$product.id TITLE=$product.title}{if $product.id_variation}#{$product.id_variation}{/if}"
|
||||
title="{t}Zobrazit produkt{/t}">{$product.product.title}</a>
|
||||
{if $product.id_variation}
|
||||
<span class="variation">{$product.product.variationTitle}</span>
|
||||
{/if}
|
||||
|
||||
{if $product.product and $product.note}
|
||||
<span class="variation">{$product.product->printNote($product.note)}</span>
|
||||
{/if}
|
||||
{block "product-inline-addons"}
|
||||
{ifmodule PRODUCTS_CHARGES}
|
||||
{if $product.product}
|
||||
{if $charges = $product.product->fetchCharges()}
|
||||
{foreach $charges as $charge}
|
||||
{if $product.note.charges[$charge.id] == 'Y'}
|
||||
<span class="variation">+ {$charge.title|default:$charge.admin_title} ({$charge.price|format_price:"ceil=no;decimal=dynamic"})</span>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/if}
|
||||
{/ifmodule}
|
||||
|
||||
{ifmodule PRODUCT_GIFTS}
|
||||
{foreach $product.product.gifts as $gift_product}
|
||||
{if !$product.note.gifts[$gift_product.id].unwanted}
|
||||
<span class="variation">+ {t}dárek{/t} {$gift_product.title}</span>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/ifmodule}
|
||||
{/block}
|
||||
{/block}
|
||||
</div>
|
||||
<div class="price-summary">
|
||||
{block 'price-total'}
|
||||
{if $tpl_vars.ordering_products_discount}
|
||||
{calc_product_discount product=$product.product assign='product_discount'}
|
||||
<div class="price-total price-total-with-discount price-total-summary">
|
||||
{if $product_discount.discount->isPositive() and $product_discount.discount->asFloat() >= 1}
|
||||
<span class="flag flag-discount">
|
||||
-{$product_discount.discount->asFloat()|round}%
|
||||
</span>
|
||||
{/if}
|
||||
<div>
|
||||
<p class="pieces-summary">
|
||||
{$product.pieces|string_format:"%.{$product.product.unit.pieces_precision|default:0}f"} {$product.product.unit.short_name|default:"{t}ks{/t}"}
|
||||
</p>
|
||||
{if $product_discount.priceOriginal}
|
||||
<del class="strike-price">{$product_discount.priceOriginal.value_with_vat->mul(toDecimal($product.pieces))|format_price}</del>
|
||||
{/if}
|
||||
|
||||
{if $isB2BUser}
|
||||
<strong>{$product.totalPrice.value_without_vat|format_price}</strong>
|
||||
{else}
|
||||
<strong>{$product.totalPrice.value_with_vat|format_price}</strong>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<p class="price-total price-total-summary">
|
||||
{if $isB2BUser}
|
||||
{$product.totalPrice.value_without_vat|format_price:"ceil=no;decimal=dynamic"}
|
||||
{else}
|
||||
{$product.totalPrice.value_with_vat|format_price:"ceil=no;decimal=dynamic"}
|
||||
{/if}
|
||||
</p>
|
||||
{/if}
|
||||
{/block}
|
||||
{if !$tpl_vars.ordering_products_discount}
|
||||
<p class="pieces-summary">
|
||||
{$product.pieces|string_format:"%.{$product.product.unit.pieces_precision|default:0}f"} {$product.product.unit.short_name|default:"{t}ks{/t}"}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{block "product-extra-addons"}
|
||||
{ifmodule PRODUCTS_CHARGES}
|
||||
{if $product.product}
|
||||
{if $charges = $product.product->fetchCharges()}
|
||||
{foreach $charges as $charge}
|
||||
{if $product.note.charges[$charge.id] == 'Y'}
|
||||
<span class="variation">+ {$charge.title|default:$charge.admin_title} ({$charge.price|format_price:"ceil=no;decimal=dynamic"})</span>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/if}
|
||||
{/ifmodule}
|
||||
|
||||
{ifmodule PRODUCT_GIFTS}
|
||||
{foreach $product.product.gifts as $gift_product}
|
||||
{if !$product.note.gifts[$gift_product.id].unwanted}
|
||||
<span class="variation">+ {t}dárek{/t} {$gift_product.title}</span>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/ifmodule}
|
||||
{/block}
|
||||
{/foreach}
|
||||
|
||||
{block 'summary-addons'}
|
||||
{include "ordering/ordering.summary.gift.tpl"}
|
||||
{include "ordering/ordering.summary.charges.tpl"}
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
{/if}
|
||||
410
web/templates/x/ordering/ordering.user.v2.tpl
Normal file
410
web/templates/x/ordering/ordering.user.v2.tpl
Normal file
@@ -0,0 +1,410 @@
|
||||
{block 'login-block'}
|
||||
{if $ctrl.logged}
|
||||
<p class="logged-as">{t}Jste přihlášený jako uživatel {/t}{$ctrl.name} {$ctrl.surname} ({$ctrl.login}).</p>
|
||||
<input type="hidden" name="invoice[email]" value="{$ctrl.login}">
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
<div class="cart-user-form-wrapper">
|
||||
{if !$ctrl.logged}
|
||||
{block 'form-header'}
|
||||
<div class="signinrow">
|
||||
{block "order-user-email"}
|
||||
<div class="form-group form-group-legend form-group-user-email required">
|
||||
<label for="iemail" class="title-default">{t}Začněte zadáním e-mailu{/t}</label>
|
||||
<input type="email" name="invoice[email]" id="iemail" value="{$body.invoice.email}"
|
||||
class="form-control smartform-instance-invoice smartform-email"
|
||||
data-bv-notempty="true" data-bv-emailaddress="true"
|
||||
data-bv-emailaddress-message="{t}Zadejte platnou e-mailovou adresu{/t}"
|
||||
data-cart="noreload" required>
|
||||
<div class="cart-user-mailcheck">
|
||||
<div id="email-text"></div>
|
||||
</div>
|
||||
<p>{t}Máte u nás účet?{/t} <a href="{url s=login}" class="cart-signin" data-wpj-modal="{$modal_login}" data-wpj-modal-type="side">{t}Přihlaste se{/t}</a></p>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
{/block}
|
||||
{/if}
|
||||
|
||||
{block "form-personal-data-address-wrapper"}
|
||||
<div class="row personal-data">
|
||||
{block "form-personal-data-address-title"}
|
||||
<div class="col-xxs-12">
|
||||
<p class="title-default">{t}Kontaktní údaje{/t}</p>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
|
||||
<div class="{$column_class}">
|
||||
<div class="form-group required">
|
||||
<label for="iname">{t}Jméno{/t}</label>
|
||||
<input type="text" name="invoice[name]" id="iname" class="form-control" value="{$body.invoice.name}"
|
||||
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="2">
|
||||
</div>
|
||||
</div>
|
||||
<div class="{$column_class}">
|
||||
<div class="form-group required">
|
||||
<label for="isurname">{t}Příjmení{/t}</label>
|
||||
<input type="text" name="invoice[surname]" id="isurname" class="form-control"
|
||||
value="{$body.invoice.surname}"
|
||||
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="2">
|
||||
</div>
|
||||
</div>
|
||||
<div class="{$column_class}">
|
||||
<div class="form-group required">
|
||||
<label for="iphone">{t}Telefon{/t}</label>
|
||||
<input type="text" name="invoice[phone]" id="iphone" class="form-control smartform-instance-invoice smartform-phone-number" value="{$body.invoice.phone}"
|
||||
data-bv-notempty="true" data-bv-phone="true"
|
||||
{if !($deliveryType and $deliveryType->isInPerson()) || $inpersonRequireAddress}
|
||||
data-bv-phone-country="invoice[country]"
|
||||
{else}
|
||||
data-bv-phone-country="{$ctrl.active_country}"
|
||||
{/if}>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{block 'invoice-address'}
|
||||
{if (!$deliveryType || !$deliveryType->isInPerson()) || $inpersonRequireAddress}
|
||||
<div class="{$column_class}">
|
||||
{block 'invoice-street'}
|
||||
<div class="form-group required">
|
||||
<label for="istreet">{t}Ulice a č.p.{/t}</label>
|
||||
<input type="text" name="invoice[street]" id="istreet" class="form-control smartform-instance-invoice smartform-address-street-and-number"
|
||||
value="{$body.invoice.street}"{if $dbcfg.smartform == "Y" or $dbcfg.here_autocomplete == "Y"} autocomplete="off"{/if} data-field-invoice-street
|
||||
data-bv-notempty="true" data-bv-regexp="true" pattern=".*\S+\s+[0-9]+.*|.*\S+[0-9]+\s+.*"
|
||||
data-bv-regexp-message="{t}Doplňte prosím číslo popisné{/t}"{if $tpl_vars.disallowEditB2B} readonly{/if}>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
<div class="{$column_class}">
|
||||
<div class="zip-group">
|
||||
<div class="form-group required">
|
||||
<label for="icity">{t}Město{/t}</label>
|
||||
<input type="text" name="invoice[city]" id="icity" class="form-control smartform-instance-invoice smartform-address-city" value="{$body.invoice.city}"{if $dbcfg.smartform == "Y" or $dbcfg.here_autocomplete == "Y"} autocomplete="off"{/if} data-field-invoice-city
|
||||
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="2"{if $tpl_vars.disallowEditB2B} readonly{/if}>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label for="izip">{t}PSČ{/t}</label>
|
||||
<input type="text" name="invoice[zip]" id="izip" class="form-control smartform-instance-invoice smartform-address-zip" value="{$body.invoice.zip}"{if $dbcfg.smartform == "Y" or $dbcfg.here_autocomplete == "Y"} autocomplete="off"{/if} data-field-invoice-zip
|
||||
data-bv-notempty="true" data-bv-zipcode="true" data-bv-zipcode-country="invoice[country]"{if $tpl_vars.disallowEditB2B} readonly{/if}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{block "invoice-country"}
|
||||
<div class="{$column_class}">
|
||||
<div class="form-group required">
|
||||
<label for="icountry">{t}Stát{/t}</label>
|
||||
{if $tpl_vars.delivery_country_picker}
|
||||
<a href="/{$body.steps.delivery.url}" class="cart-country-link">{t}Jiný stát?{/t}</a>
|
||||
{/if}
|
||||
<select class="form-control" id="icountry" name="invoice[country]"
|
||||
{if $cfg.Order.Countries|count == 1 || $tpl_vars.delivery_country_picker || $tpl_vars.disallowEditB2B}readonly{/if}>
|
||||
{html_options options=$cfg.Order.Countries selected=$body.invoice.country|default:$ctrl.active_country}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block "invoice-custom-data"}
|
||||
{if (!$deliveryType || !$deliveryType->isInPerson()) || $inpersonRequireAddress}
|
||||
<div class="col-xxs-12">
|
||||
<div class="form-group form-group-legend">
|
||||
<label for="icustom_address">{t}Upřesnění adresy (areál,…){/t}</label>
|
||||
<input type="text" name="invoice[custom_address]" id="icustom_address" class="form-control" value="{$body.invoice.custom_address}">
|
||||
<span class="legend">{t}Nepovinné{/t}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block "user-registration"}
|
||||
{if !$ctrl.logged}
|
||||
<div class="row">
|
||||
<div class="col-xxs-12">
|
||||
<div class="form-group">
|
||||
<label for="new-account" class="custom-control custom-checkbox-lg">
|
||||
<input type="checkbox" name="new-account" id="new-account" class="custom-control-input"
|
||||
data-opener="[data-password]" {if $body.register}checked{/if}>
|
||||
|
||||
<span class="custom-control-indicator"></span>
|
||||
{t}Chci vytvořit účet{/t}
|
||||
<span class="clear-alt-address" style="display: none;">{t}zrušit{/t}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{* pokud jednou submittnu heslo, už se nedá vymazat, protože odchecknutí checkboxu input s heslem disabluje,
|
||||
takže se neodešle s prázdnou hodnotou. Prázdný hidden input se odešle. *}
|
||||
|
||||
<input type="hidden" name="password" value="">
|
||||
<div class="opener-content" style="display: {if $body.register}block{else}none{/if};"
|
||||
data-password>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-xxs-12">
|
||||
<div id="passwords">
|
||||
<div class="form-group form-group-legend required">
|
||||
<label for="password">{t}Heslo{/t}</label>
|
||||
{block "password"}
|
||||
<input type="password" name="password" value="{$body.register}" id="password" class="form-control"
|
||||
autocomplete="new-password"
|
||||
{if !$body.register}disabled{/if} data-bv-notempty="true"
|
||||
data-bv-stringlength="true" data-bv-stringlength-min="6">
|
||||
{/block}
|
||||
<a href="#" data-toggle-password>{t}Zobrazit{/t}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{block "user-registration-gender"}
|
||||
<div class="col-xxs-12 col-lg-6">
|
||||
<div class="form-group form-group-legend">
|
||||
<label for="igender">{t}Pohlaví{/t}</label>
|
||||
<select class="form-control custom-select" id="igender" name="invoice[gender]">
|
||||
<option value=""{if !$body.invoice.gender} selected="selected"{/if}>{t}Neuvedeno{/t}</option>
|
||||
<option value="male"{if $body.invoice.gender === 'male'} selected="selected"{/if}>{t}muž{/t}</option>
|
||||
<option value="female"{if $body.invoice.gender === 'female'} selected="selected"{/if}>{t}žena{/t}</option>
|
||||
</select>
|
||||
<span class="legend">{t}Nepovinné{/t}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block "form-different-delivery"}
|
||||
|
||||
{* nejdriv check zda existuje deliverytype *}
|
||||
{* skryt fakt. adresu pokud deliverytype nevyzaduje dor. adresu (napr. balik na postu) *}
|
||||
{if !$deliveryType || $deliveryType->getDelivery()->requiresDeliveryAddress()}
|
||||
<div class="form-group">
|
||||
<label for="different-address" class="custom-control custom-checkbox-lg">
|
||||
<input type="hidden" name="different_address" value="0">
|
||||
<input class="custom-control-input" type="checkbox" name="different_address"
|
||||
data-opener="#different-address-content" id="different-address"
|
||||
{if $body.delivery.name}checked{/if}>
|
||||
<span class="custom-control-indicator"></span>
|
||||
{t}Dodání na jinou adresu nebo do zaměstnání{/t}
|
||||
<span class="clear-alt-address" style="display: none;">smazat</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="opener-content" id="different-address-content"
|
||||
style="display:{if $body.delivery.name}block{else}none{/if}">
|
||||
{block 'form-delivery-address'}
|
||||
<div class="row">
|
||||
<div class="col-xxs-12">
|
||||
<p class="title-default">{t}Dodací adresa{/t}</p>
|
||||
</div>
|
||||
<div class="{$column_class}">
|
||||
<div class="form-group required">
|
||||
<label for="name">{t}Jméno{/t}</label>
|
||||
<input type="text" name="delivery[name]" id="name" class="form-control"
|
||||
value="{$body.delivery.name}" autocomplete="off"
|
||||
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="3">
|
||||
</div>
|
||||
</div>
|
||||
<div class="{$column_class}">
|
||||
<div class="form-group required">
|
||||
<label for="surname">{t}Příjmení{/t}</label>
|
||||
<input type="text" name="delivery[surname]" id="surname" class="form-control"
|
||||
value="{$body.delivery.surname}" autocomplete="off"
|
||||
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="3">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="{$column_class}">
|
||||
<div class="form-group">
|
||||
<label for="phone">{t}Telefon{/t}</label>
|
||||
<input type="text" name="delivery[phone]" id="phone" class="form-control" value="{$body.delivery.phone}" autocomplete="off" data-bv-phone="true"
|
||||
{if !($deliveryType and $deliveryType->isInPerson()) || $inpersonRequireAddress}
|
||||
data-bv-phone-country="delivery[country]"
|
||||
{else}
|
||||
data-bv-phone-country="{$ctrl.active_country}"
|
||||
{/if}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{$column_class}">
|
||||
{block "delivery-street"}
|
||||
<div class="form-group required">
|
||||
<label for="street">{t}Ulice a č.p.{/t}</label>
|
||||
<input type="text" name="delivery[street]" id="street" class="form-control smartform-instance-delivery smartform-address-street-and-number"
|
||||
value="{$body.delivery.street}"{if $dbcfg.smartform == "Y" or $dbcfg.here_autocomplete == "Y"} autocomplete="off"{/if} data-field-delivery-street
|
||||
data-bv-notempty="true" data-bv-regexp="true" pattern=".*\S+\s+[0-9]+.*|.*\S+[0-9]+\s+.*"
|
||||
data-bv-regexp-message="{t}Doplňte prosím číslo popisné{/t}">
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
<div class="{$column_class}">
|
||||
<div class="zip-group">
|
||||
<div class="form-group required">
|
||||
<label for="city">{t}Město{/t}</label>
|
||||
<input type="text" name="delivery[city]" id="city" class="form-control smartform-instance-delivery smartform-address-city"
|
||||
value="{$body.delivery.city}"{if $dbcfg.smartform == "Y" or $dbcfg.here_autocomplete == "Y"} autocomplete="off"{/if} data-field-delivery-city
|
||||
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="2">
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label for="zip">{t}PSČ{/t}</label>
|
||||
<input type="text" name="delivery[zip]" id="zip" class="form-control smartform-instance-delivery smartform-address-zip" value="{$body.delivery.zip}"
|
||||
{if $dbcfg.smartform == "Y" or $dbcfg.here_autocomplete == "Y"} autocomplete="off"{/if} data-field-delivery-zip data-bv-notempty="true" data-bv-zipcode="true"
|
||||
data-bv-zipcode-country="delivery[country]">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{block "form-delivery-country"}
|
||||
<div class="{$column_class}">
|
||||
<div class="form-group required">
|
||||
<label for="country">{t}Stát{/t}
|
||||
{if $tpl_vars.delivery_country_picker}
|
||||
<a href="/{$body.steps.delivery.url}" class="cart-country-link">{t}Jiný stát?{/t}</a>
|
||||
{/if}
|
||||
</label>
|
||||
<select class="form-control" id="country" name="delivery[country]" autocomplete="off"
|
||||
{if $cfg.Order.Countries|count == 1}readonly{/if}>
|
||||
{html_options options=$cfg.Order.Countries selected=$body.delivery.country|default:$ctrl.active_country}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block "delivery-custom-address"}
|
||||
<div class="col-xxs-12">
|
||||
<div class="form-group">
|
||||
<label for="firm">{t}Upřesnění adresy (areál,...){/t}</label>
|
||||
<input type="text" name="delivery[firm]" id="firm" class="form-control"
|
||||
value="{$body.delivery.firm}" autocomplete="off"
|
||||
data-bv-stringlength="true" data-bv-stringlength-min="3">
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{* pokud je os. odběr, vymazat del. adress, mohla zbyt z předchozího průchodu košíkem *}
|
||||
{if $deliveryType and ($deliveryType->isInPerson() or $deliveryType->isVirtual())}
|
||||
<input type="hidden" name="delivery[name]" value="">
|
||||
<input type="hidden" name="delivery[surname]" value="">
|
||||
<input type="hidden" name="delivery[firm]" value="">
|
||||
<input type="hidden" name="delivery[street]" value="">
|
||||
<input type="hidden" name="delivery[city]" value="">
|
||||
<input type="hidden" name="delivery[zip]" value="">
|
||||
<input type="hidden" name="delivery[country]" value="">
|
||||
{/if}
|
||||
{block 'delivery-place'}
|
||||
{/block}
|
||||
{block 'firm-address-checkbox'}
|
||||
<div class="form-group">
|
||||
<label for="firm-address" class="custom-control custom-checkbox-lg">
|
||||
<input type="hidden" name="firm_address" value="0">
|
||||
<input type="checkbox" name="firm_address" id="firm-address" class="custom-control-input"
|
||||
data-opener="[data-firm-address]" {$body.invoice.firm|checked}>
|
||||
<span class="custom-control-indicator"></span>
|
||||
{t}Nakupuji na firmu (IČ, DIČ){/t}
|
||||
<span class="clear-alt-address" style="display: none;">{t}smazat{/t}</span>
|
||||
</label>
|
||||
</div>
|
||||
{/block}
|
||||
<div class="opener-content" style="display:{if $body.invoice.firm}block{else}none{/if}"
|
||||
data-firm-address>
|
||||
{block 'firm-address'}
|
||||
<p class="title-default">{t}Firemní údaje{/t}</p>
|
||||
<div class="row">
|
||||
<div class="{$column_class}">
|
||||
<div class="form-group required">
|
||||
<label for="ifirm">{t}Název firmy{/t}</label>
|
||||
<input type="text" name="invoice[firm]" id="ifirm" class="form-control smartform-company-name" value="{$body.invoice.firm}"
|
||||
autocomplete="off"
|
||||
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="3" {if $tpl_vars.disallowEditB2B}readonly{/if}>
|
||||
</div>
|
||||
</div>
|
||||
{if $showCopyEmail}
|
||||
<div class="{$column_class}">
|
||||
<div class="form-group">
|
||||
<label for="icopy_email">{t}E-mail pro fakturaci{/t}</label>
|
||||
<input type="email" name="invoice[copy_email]" id="icopy_email"
|
||||
class="form-control smartform-instance-invoice smartform-email"
|
||||
value="{$body.invoice.copy_email}">
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="{$column_class}">
|
||||
<div class="form-group required">
|
||||
<label for="iico">{t}IČO{/t}</label>
|
||||
<input type="number" name="invoice[ico]" id="iico" class="form-control disable-spinner smartform-company-registration-number"
|
||||
value="{$body.invoice.ico}" autocomplete="off"
|
||||
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="8"
|
||||
data-bv-stringlength-max="10" {if $tpl_vars.disallowEditB2B}readonly{/if}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{$column_class}">
|
||||
<div class="form-group">
|
||||
<label for="idic">{t}DIČ{/t}</label>
|
||||
<input type="text" name="invoice[dic]" id="idic" class="form-control smartform-company-vat-number" value="{$body.invoice.dic}"
|
||||
autocomplete="off"
|
||||
data-bv-vat="true" data-bv-vat-country="invoice[country]" {if $tpl_vars.disallowEditB2B}readonly{/if}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{$column_class} dic-notify">
|
||||
<p>{t escape=false}Vyplníte-li platné zahraniční DIČ,<br> objednávka bude osvobozena od DPH.{/t}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block 'firm-invoice-address'}
|
||||
{* mam osobni odber (nevyzaduje zadani adresy), chci fakturu na firmu *}
|
||||
{if $deliveryType and $deliveryType->isInPerson() and !$inpersonRequireAddress}
|
||||
<div class="row">
|
||||
<div class="{$column_class}">
|
||||
<div class="form-group required">
|
||||
<label for="istreet">{t}Ulice a č.p.{/t}</label>
|
||||
<input type="text" name="invoice[street]" id="istreet" class="form-control smartform-company-address-street-and-number"
|
||||
value="{$body.invoice.street}" autocomplete="off" data-field-invoice-street
|
||||
data-bv-notempty="true" data-bv-regexp="true" pattern=".*\S+\s+[0-9]+.*|.*\S+[0-9]+\s+.*"
|
||||
data-bv-regexp-message="{t}Doplňte prosím číslo popisné{/t}"{if $tpl_vars.disallowEditB2B} readonly{/if}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-sm-6 col-xxs-12">
|
||||
<div class="form-group required">
|
||||
<label for="icity">{t}Město{/t}</label>
|
||||
<input type="text" name="invoice[city]" id="icity" class="form-control smartform-company-address-city"
|
||||
value="{$body.invoice.city}" autocomplete="off" data-field-invoice-city
|
||||
data-bv-notempty="true" data-bv-stringlength="true" data-bv-stringlength-min="2"{if $tpl_vars.disallowEditB2B} readonly{/if}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-2 col-lg-3 col-sm-6 col-xxs-12">
|
||||
<div class="form-group required">
|
||||
<label for="izip">{t}PSČ{/t}</label>
|
||||
<input type="text" name="invoice[zip]" id="izip" class="form-control smartform-company-address-zip" value="{$body.invoice.zip}"
|
||||
autocomplete="off" data-bv-notempty="true" data-bv-zipcode="true" data-field-invoice-zip
|
||||
data-bv-zipcode-country="invoice[country]"{if $tpl_vars.disallowEditB2B} readonly{/if}>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="{$column_class}">
|
||||
<div class="form-group required">
|
||||
<label for="icountry">{t}Stát{/t}
|
||||
{if $tpl_vars.delivery_country_picker}
|
||||
<a href="/{$body.steps.delivery.url}" class="cart-country-link">{t}Jiný stát?{/t}</a>
|
||||
{/if}
|
||||
</label>
|
||||
<select class="form-control c-select custom-select smartform-company-address-country" id="icountry" name="invoice[country]"
|
||||
autocomplete="off" {if $cfg.Order.Countries|count == 1 || $tpl_vars.disallowEditB2B}readonly{/if}>
|
||||
{html_options options=$cfg.Order.Countries selected=$body.invoice.country|default:$ctrl.active_country}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
35
web/templates/x/ordering/ordering.voucher.tpl
Normal file
35
web/templates/x/ordering/ordering.voucher.tpl
Normal file
@@ -0,0 +1,35 @@
|
||||
{* data-cart-noreload znamena, ze ho nehandluje wpj.cart.js (ktery reloaduje kosik po hned po input change),
|
||||
ale custom kod v wpj.cart.voucher.js (reloaduje az po kliknuti na tlacitko) *}
|
||||
<div class="cart-voucher" data-cart-voucher data-reload="cart-voucher" data-cart-noreload>
|
||||
{if $hidden and !$body.coupons and !$body.couponNo}
|
||||
<p><a href="" data-voucher-show>{$voucher_title|default:"{t}Mám slevový kód{/t}"}</a></p>
|
||||
{/if}
|
||||
|
||||
<div class="input-group">
|
||||
<input type="text" name="couponNo" placeholder="{$voucher_placeholder_descr|default:"{t}Mám slevový kód{/t}" nofilter}" value="{$body.couponNo}" class="form-control">
|
||||
<button type="submit" name="AddDiscount" value="1" class="btn {$tpl_vars.voucher_btn_class}" disabled>{t}Uplatnit{/t}</button>
|
||||
</div>
|
||||
|
||||
{if $body.coupons}
|
||||
<div class="cart-vouchers-active">
|
||||
{foreach $body.coupons as $coupon}
|
||||
<div class="item">
|
||||
<div class="title">{t}Uplatněný slevový kód:{/t} <strong>{$coupon}</strong></div>
|
||||
<button type="button" name="DeleteDiscount" value="{$coupon}" class="btn btn-link">
|
||||
{t}Odstranit{/t}
|
||||
</button>
|
||||
</div>
|
||||
{ifmodule ORDER_DISCOUNT}
|
||||
{get_coupon_price coupon=$coupon cart=$body assign=couponPrice}
|
||||
{if $couponPrice}
|
||||
<div class="small" style="text-align: right">
|
||||
Hodnota poukazu {$couponPrice.coupon_price|format_price:"ceil=no;decimal=dynamic"},
|
||||
uplatněno {$couponPrice.used_coupon_price|format_price:"ceil=no;decimal=dynamic"},
|
||||
zbývá {$couponPrice.remaining_coupon_price|format_price:"ceil=no;decimal=dynamic"}.
|
||||
</div>
|
||||
{/if}
|
||||
{/ifmodule}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
Reference in New Issue
Block a user