first commit
This commit is contained in:
52
web/templates/kupkolo/ordering/ordering.btns.tpl
Normal file
52
web/templates/kupkolo/ordering/ordering.btns.tpl
Normal file
@@ -0,0 +1,52 @@
|
||||
<div class="row cart-btns">
|
||||
{if $body.stepName == 'summary'}
|
||||
<div class="col-xl-6 col-lg-5 col-xs-12 text-lg-right text-xs-center pull-right summary-checkboxes col-xl-pull-3 col-lg-pull-4">
|
||||
{if $dbcfg.gdpr.enable != 'Y'}
|
||||
{block 'cart-summary-tos'}
|
||||
<p>{t escape=false}Stisknutím "Potvrdit objednávku" souhlasíte s
|
||||
<a href="/obchodni-podminky/" target="_blank">obchodními podmínkami</a>
|
||||
{/t}</p>
|
||||
{/block}
|
||||
{block 'cart-summary-newsletter'}
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="news" value="0">
|
||||
<label class="c-input c-checkbox custom-control custom-checkbox">
|
||||
<input type="checkbox" name="news" class="custom-control-input" checked>
|
||||
<span class="c-indicator custom-control-indicator"></span>
|
||||
{t}Odebírat novinky{/t}
|
||||
</label>
|
||||
</div>
|
||||
{/block}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $body.products|count}
|
||||
<div class="col-xl-3 col-lg-4 col-sm-6 col-xs-12 pull-right text-sm-right text-xs-center {if $body.stepName == 'summary'}col-xl-push-6 col-lg-push-5{/if}">
|
||||
<div {if $body.stepName == 'cart'}data-reload="cart_btns"{/if}>
|
||||
<button class="btn {$cartVars.butttonNext} {if $body.stepName == 'summary'}btn-block btn-nextstep-last{/if}"
|
||||
type="submit" name="{$submitName}"
|
||||
value="{$valueNext}">{block 'cart-summary-btn-text'}{if $body.stepName == 'summary'}{t price=$body.totalPricePay|format_price}Koupit za {price}{/t}{else}{$cartVars.text}{/if}{/block}</button>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="col-lg-3 text-sm-left text-xs-center col-sm-6 pull-left col-xs-12 ">
|
||||
{if $body.stepName == 'cart'}
|
||||
{block 'cart-btns-back-to-shopping'}
|
||||
{get_referer assign='referer'}
|
||||
{if !$referer|stripos:'_z'}{$referer = '/'}{/if}
|
||||
<a href="{$referer}" class="btn {$cartVars.butttonPrev}">{t}Zpět k nákupu{/t}</a>
|
||||
{/block}
|
||||
{else}
|
||||
{$step = $body->findPreviousStep($body.stepName)}
|
||||
<a href="{$cfg.Addr.rel}{$step.url}" class="btn {$cartVars.butttonPrev}">{t}Předchozí krok{/t}</a>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{if $body.products|count and $body.stepName != 'summary'}
|
||||
<div class="col-xl-6 col-lg-5 text-lg-right text-xs-center col-xs-12 text-right nextstep-info">
|
||||
<p>{$msg}</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,84 @@
|
||||
{*vykopírováno z X kvůli novým vratkám*}
|
||||
|
||||
{$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}
|
||||
|
||||
<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]}' >
|
||||
|
||||
<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 "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}
|
||||
23
web/templates/kupkolo/ordering/ordering.freedelivery.tpl
Normal file
23
web/templates/kupkolo/ordering/ordering.freedelivery.tpl
Normal file
@@ -0,0 +1,23 @@
|
||||
{get_free_delivery assign='freeDelivery' key=$ctrl.currency}
|
||||
{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}
|
||||
97
web/templates/kupkolo/ordering/ordering.pricebox.tpl
Normal file
97
web/templates/kupkolo/ordering/ordering.pricebox.tpl
Normal file
@@ -0,0 +1,97 @@
|
||||
<div class="price-box">
|
||||
<div data-reload="price">
|
||||
{block "cart-pricebox"}
|
||||
{if $module.ORDER_DISCOUNT && ($body->getPurchaseState()->getDiscounts() || $body->getPurchaseState()->getCharges())}
|
||||
{$cartDiscountActive = true}
|
||||
{/if}
|
||||
|
||||
{block "pricebox-product-price"}
|
||||
{if $transport==1 or $cartDiscountActive}
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<p>{t}Cena zboží{/t}</p>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<p>{if $noVat}{$body.totalPriceNoVat|format_price}{else}{$body.totalPriceWithVat|format_price}{/if}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{* 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="row discount">
|
||||
<div class="col-xs-7">
|
||||
<p>{$discount->getName()}</p>
|
||||
</div>
|
||||
<div class="col-xs-5 text-right">
|
||||
<p>{if $noVat}{$discount->getPriceWithoutVat()|format_price:"ceil=no;decimal=dynamic"}
|
||||
{else}{$discount->getPriceWithVat()|format_price:"ceil=no;decimal=dynamic"}{/if}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
{block "pricebox-charges"}
|
||||
{if $body->getPurchaseState()->getCharges()}
|
||||
{foreach $body->getPurchaseState()->getCharges() as $charge}
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<p>{$charge->getName()}</p>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<p>{if $noVat}{$charge->getPrice()->getPriceWithoutVat()|format_price:"ceil=no;decimal=dynamic"}
|
||||
{else}{$charge->getPrice()|format_price:"ceil=no;decimal=dynamic"}{/if}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{if $transport==1}
|
||||
{block "pricebox-transport"}
|
||||
{if !$body.transport}
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<p>{if !$body.delivery_id}
|
||||
{t}Vyberte dopravu{/t}
|
||||
{else}
|
||||
{t}Vyberte platbu{/t}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<p>{t}Doprava a platba{/t}</p>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<p>
|
||||
{$delivery = $body->getDeliveryType()}
|
||||
{if $noVat}{$delivery.price.value_without_vat|format_price}{else}{$delivery.price.value_with_vat|format_price}{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
{/if}
|
||||
|
||||
{block "pricebox-total-price"}
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<p class="total-price">{if $dbcfg.shop_vat_payer == "Y"}{if $noVat}{t}Celkem bez DPH{/t}{else}{t}Celkem s DPH{/t}{/if}{else}{*cena*}{t}Celkem{/t}{/if}</p>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<h3>{if $noVat}{$body.totalPricePayNoVat|format_price}{else}{$body.totalPricePay|format_price}{/if}</h3>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
19
web/templates/kupkolo/ordering/ordering.process.tpl
Normal file
19
web/templates/kupkolo/ordering/ordering.process.tpl
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="row order-process">
|
||||
{$visited = true}
|
||||
{foreach $body.steps as $stepName => $step}
|
||||
{if $stepName == $body.stepName}{$visited = false}{/if}
|
||||
<div class="col-xs-3 {if $step.selected}active{/if}">
|
||||
{if $visited}
|
||||
<a href="/{$step.url}" class="order-process-step">
|
||||
<span class="step">{$step@iteration}<i>/{$body.steps|count}</i></span>
|
||||
<span class="step-title">{$step.title}</span>
|
||||
</a>
|
||||
{else}
|
||||
<div class="order-process-step">
|
||||
<span class="step">{$step@iteration}<i>/{$body.steps|count}</i></span>
|
||||
<span class="step-title">{$step.title}</span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
78
web/templates/kupkolo/ordering/ordering.products.tpl
Normal file
78
web/templates/kupkolo/ordering/ordering.products.tpl
Normal file
@@ -0,0 +1,78 @@
|
||||
{* @compiler:inline-only *}
|
||||
<div class="table-cart cart">
|
||||
{foreach $body.products as $product}
|
||||
<div class="product">
|
||||
<div class="product-inner display-table" data-cart="row"
|
||||
data-product-id="{$product.id}{if $product.id_variation}_{$product.id_variation}{/if}">
|
||||
<div class="col-xs-1 product-image">
|
||||
<a title="{t}Zobrazit zboží{/t}" href="{url s=product IDproduct=$product.id TITLE=$product.title}{if $product.id_variation}#{$product.id_variation}{/if}">
|
||||
{block "cart-img"}
|
||||
<img src="{get_photo photo=$product.image size=2}" alt="{$product.title}" class="img-responsive">
|
||||
{/block}
|
||||
</a>
|
||||
</div>
|
||||
{block 'cart-title'}
|
||||
<div class="col-xs-5 product-title">
|
||||
<a title="Zobrazit zboží" href="{url s=product IDproduct=$product.id TITLE=$product.title}">{$product.title}</a>
|
||||
|
||||
{if $product.availability eq 0 and $product.inStore eq 0}
|
||||
<p class="delivery delivery-notinstore">{t}nedostupné{/t}</p>
|
||||
{elseif $product.availability eq 0 and $product.inStore gt 0 }
|
||||
<p class="delivery delivery-partly">{t pocet=$product.inStore}skladem pouze {pocet} ks{/t}</p>
|
||||
{elseif $product.availability eq 1}
|
||||
<p class="delivery delivery-instore">{t}skladem{/t}</p>
|
||||
{elseif $product.availability eq 2}
|
||||
<p class="delivery delivery-instore">{t}skladem u dodavatele{/t}</p>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
{block 'price-per-piece'}
|
||||
<div class="col-xs-1 product-price-per-piece">
|
||||
{$product.price.value_with_vat|format_price} /
|
||||
{if $module.PRODUCTS__UNITS}
|
||||
{$product.product.unit.short_name|lower}
|
||||
{else}
|
||||
{t}Ks{/t}
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
{block 'cart-pieces'}
|
||||
<div class="col-xs-3 product-pieces">
|
||||
<label for="products[{$product.idincart}][pieces]" class="hidden-xl-down">{t}Množství{/t}</label>
|
||||
{$precision = $product.product.unit.pieces_precision|default:0}
|
||||
<input type="number" id="products[{$product.idincart}][pieces]" name="products[{$product.idincart}][pieces]" value="{$product.pieces|number_format:$precision}"
|
||||
class="form-control" maxlength="3" size="2" data-bv-excluded="true" data-cart="pieces"
|
||||
{if $module.PRODUCTS__UNITS_FLOAT}step="{$product.product.unit.step}" data-precision="{$product.product.unit.pieces_precision|default:0}" min="{$product.product.unit.step}"{else}min="1"{/if}>
|
||||
<div class="buy_count">
|
||||
<i class="fc fc-angle-up" data-cart="plus" title="{t}Přidat ks{/t}"></i>
|
||||
<i class="fc fc-angle-down" data-cart="minus" title="{t}Odebrat ks{/t}"></i>
|
||||
{if $module.PRODUCTS__UNITS_FLOAT}
|
||||
<p class="ordering-product-units">{$product.product.unit.short_name|lower}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block 'cart-price'}
|
||||
<div class="col-xs-1 product-price-total">
|
||||
{$product.totalPrice.value_with_vat|format_price}
|
||||
</div>
|
||||
{/block}
|
||||
{block 'cart-delete'}
|
||||
<div class="col-xs-1 product-delete">
|
||||
<a href="{url s=cart act=erase IDInCart=$product.idincart}" class="delete-product" data-cart="delete">
|
||||
<i class="fc lightbox_close"></i>
|
||||
</a>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
{block "product-sets-custom"}{/block}
|
||||
</div>
|
||||
|
||||
{block "product-charges"}{/block}
|
||||
|
||||
{*darek k produktu*}
|
||||
{block "product-sets"}
|
||||
{include "ordering/ordering.sets.tpl"}
|
||||
{/block}
|
||||
{/foreach}
|
||||
</div>
|
||||
46
web/templates/kupkolo/ordering/ordering.sets.tpl
Normal file
46
web/templates/kupkolo/ordering/ordering.sets.tpl
Normal file
@@ -0,0 +1,46 @@
|
||||
{* @compiler:inline-only *}
|
||||
|
||||
{if $product.sets}
|
||||
{foreach $product.sets as $set_product}
|
||||
{$set_product->fetchImages(2)}
|
||||
<div class="row product set" data-cart="row">
|
||||
<div class="product-image">
|
||||
<a title="{t}Zobrazit zboží{/t}" href="{url s=product IDproduct=$set_product.id TITLE=$set_product.title}">
|
||||
<img src="{get_photo photo=$set_product.image size=2}" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<div class="product-title">
|
||||
<a title="{t}Zobrazit zboží{/t}"
|
||||
href="{url s=product IDproduct=$set_product.id TITLE=$set_product.title}">{$set_product.title}</a>
|
||||
<span>{t}set{/t}</span>
|
||||
</div>
|
||||
|
||||
<div class="set-variations">
|
||||
{$variations = $set_product->fetchVariations(true)}
|
||||
|
||||
{* Select first available or already selected one *}
|
||||
{if $product.note.set_variation[$set_product.id] > 0}
|
||||
{$id_selected = $product.note.set_variation[$set_product.id]}
|
||||
{/if}
|
||||
|
||||
{foreach $variations.variations as $variation}
|
||||
{if $variation.in_store > 0}
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="products[{$product.idincart}][note][set_variation][{$set_product.id}]"
|
||||
value="{$variation.id}"
|
||||
{if (!$id_selected and !$firstSelected) or $id_selected == $variation.id}checked{/if}>
|
||||
{$firstSelected = true}
|
||||
{foreach $variation.combinations as $index => $comb}
|
||||
{assign var="il" value=$comb.id_label}
|
||||
{assign var="iv" value=$comb.id_value}
|
||||
{$variations.labels[$il].values[$iv]}
|
||||
{/foreach}
|
||||
</label>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
22
web/templates/kupkolo/ordering/ordering.voucher.tpl
Normal file
22
web/templates/kupkolo/ordering/ordering.voucher.tpl
Normal file
@@ -0,0 +1,22 @@
|
||||
<div class="cart-voucher">
|
||||
{if $module.ORDER_DISCOUNT}
|
||||
{$coupon = $body.coupons|reset}
|
||||
{if $coupon}
|
||||
<button class="btn btn-white" type="submit" name="DeleteDiscount" value="1">
|
||||
<i class="fc fc-remove"></i> {t kod=$coupon escape=false}Odebrat slevový kód <strong>{kod}</strong>{/t}
|
||||
</button>
|
||||
{else}
|
||||
<span data-reload="discount"></span>
|
||||
<p><a href="">{t}Uplatnit slevový kód{/t}</a></p>
|
||||
<div>
|
||||
<div class="input-group">
|
||||
<input type="text" name="couponNo" id="couponNo" placeholder="{t}Slevový kód{/t}" value="{$coupon}"
|
||||
class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<input class="btn btn-gray" type="submit" name="AddDiscount" value="{t}Přidat slevu{/t}">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
Reference in New Issue
Block a user