Permalink
Browse files

update

  • Loading branch information...
dmitry-fomin committed Sep 21, 2016
1 parent 5f19730 commit 18c8d3da89fb9e75d1952abdb054da66df74cdee
View
@@ -13,105 +13,105 @@
{include file="$TMPL_FOLDER/mod/Pathline.html"}
{include file="$TMPL_FOLDER/mod/ShopExpressCountDown.html"}
{include file="$TMPL_FOLDER/mod/Anonces.html"}
<h1>{$name}</h1>
{if sizeof($basketdata)}
<h1>{$name}{if sizeof($order_storage)}<small class="pull-right">Ваш заказ {foreach from=$order_storage item=order_storage_item_hash key=order_storage_item_key}<a href="/basket/?{$order_storage_item_key}|{$order_storage_item_hash}" class="label {if $order_storage_item_key eq $order_id}label-warning{else}label-info{/if}">№{$order_storage_item_key}</a> {/foreach}</small>{/if}</h1>
<script>var eShopPostIndex = '{$postindex}';</script>
<div class="basket-content content wide">
{if $coupon.coupon_id}
<div class="coupon-alert alert {if !$coupon.status}alert-error{else}hide{/if}">
{if !$coupon.statuses.date}<li>Ошибочная дата использования купона.{/if}
{if !$coupon.statuses.price}<li>Сумма заказа не подходит. {/if}
{if !$coupon.statuses.count}<li>Количество товаров слишком мало. {/if}
{if !$coupon.statuses.used}<li>Купон уже использовали максимальное количество раз. {/if}
{if !$coupon.statuses.self_used}<li>Вы активировали купон ранее. {/if}
</div>
<div class="alert alert-success">
Вы активировали <b>{$coupon.name}</b> на {if $coupon.percent} <b>{$coupon.percent}%</b> {if $coupon.money} и {/if}{/if} {if $coupon.money} <b>{$coupon.money} {numeral number=$coupon.money ends=$GLOBS.currency.name}</b>{/if} <br>
{if $coupon.count_from || $coupon.count_to || $coupon.price_from || $coupon.price_to}
При покупке
{if $coupon.count_from} <u>от {$coupon.count_from} {numeral number=$coupon.count_from ends="вещи, вещей, вещей"}</u>{/if}
{if $coupon.count_to} до {$coupon.count_to} {numeral number=$coupon.count_from ends="вещи, вещей, вещей"}{/if}
{if $coupon.price_from || $coupon.price_to} на общую сумму {/if}
{if $coupon.price_from} <u>от {$coupon.price_from} {numeral number=$coupon.price_from|price:false ends=$GLOBS.currency.name}</u>{/if}
{if $coupon.price_to} до {$coupon.price_to} {numeral number=$coupon.price_to|price:false ends=$GLOBS.currency.name}{/if}.
{/if}
Время действия до {$coupon.date_to|date_format:"%d %B"}.
<a href="?coupon_destroy">Не использовать купон в этом заказе.</a>
</div>
{/if}
<table class="table table-striped">
<thead>
<tr>
<th></th>
<th>Товар</th>
<th nowrap="nowrap">Кол-во</th>
<th>Цена</th>
<!--th>Скидка (%)</th-->
<!--th>Цена со скидкой</th-->
<th>Всего</th>
<!--th>Всего со скидкой</th-->
<th></th>
</tr>
</thead>
<tbody>
{foreach from=$basketdata item=item}
{include file="$TMPL_FOLDER/mod/basket/basket-item.html"}
{/foreach}
</tbody>
</table>
{* вывод сразу всех накопительных скидок *}
{if sizeof($discounts)}
<script>
var totalUserSpent = {$totalUserSpent|default:0};
var totalUserCount = {$totalUserCount|default:0};
var moneyRound = {$GLOBS.currency.round|default:0};
var GlobalCurrency = '{$GLOBS.currency.name|default:''}';
var discounts = [];
{foreach from=$discounts item=discount}discounts.push( { 'percent' : {$discount.percent|default:0}, 'money' : {$discount.money|default:0}, 'price_from' : {$discount.price_from}, 'price_to' : {$discount.price_to}, 'count_from' : {$discount.count_from}, 'count_to' : {$discount.count_to}, 'date_to_seconds' : {$discount.date_to_seconds}, 'date_from_seconds' : {$discount.date_from_seconds}, 'type': '{$discount.type}' } );{/foreach}
{if $mintotal}var minTotal = '{$mintotal}';{/if}
</script>
{/if}
<script>var eShopPostIndex = '{$postindex}';</script>
<p class="order-total">
<span id="basketCount">{$count}</span> шт. на сумму: <b><span id="basketTotal">{$total|price:false}</span> {numeral number=$total|price:false ends=$GLOBS.currency.name}</b>
<small class="label label-success {if !$basketdiscount}hide{/if}">Ваша скидка: <span id="basketDiscount">{$basketdiscount.human}</span></small>
<small {if $oldtotal eq $total}class="hide"{/if}><br />Сумма без скидки: <span id="basketOldTotal">{$oldtotal|price:false}</span> {numeral number=$oldtotal|price:false ends=$GLOBS.currency.name}<br /></small>
{if $totalweight}<small>Вес заказа: <span id="totalWeight">{$totalweight}</span> {numeral number=$totalweight|price:false ends='грамм,грамма,грамм'}</small>{/if}
</p>
{if !$coupon.coupon_id && $coupons_enable}
<form action="/basket/" method="post" class="pull-right col-lg-4 col-md-5 col-sm-6 col-xs-6">
<div class="input-group">
<input type="text" class="form-control" id="inputCoupon" name="coupon" autocomplete=off value="">
<span class="input-group-btn">
<button type="submit" class="btn btn-coupon">Использовать купон</button>
</span>
</div>
</form>
<br clear="all" />
{/if}
{if $mintotal}
<div class="well mintotal {if $mintotal <= $oldtotal}hide{/if}">
<h4 align="center">Минимальная сумма заказа {$mintotal|price}</h4>
</div>
{/if}
{include file="$TMPL_FOLDER/mod/basket/basket-inner.html"}
</div>
{if sizeof($basketdata) && $ext_basketextendedv2}
<div class="text-center">
<button type="button" class="btn btn-submit btn-lg" data-toggle="modal" data-target="#BasketMagicLink">
Вы можете открыть доступ к корзине своим друзьям
</button>
</div>
<div class="content wide orderform-content{if $mintotal && $mintotal > $oldtotal} hide{/if}">
<div class="modal fade" id="BasketMagicLink" tabindex="-1" role="dialog" aria-labelledby="BasketMagicLinkTitle">
<div class="modal-dialog" role="document" style="max-width:450px;">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Закрыть"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="BasketMagicLinkTitle">Отправьте уникальную ссылку на корзину себе или своим друзьям, чтобы иметь к ней доступ на любом устройстве.</h4>
</div>
<div class="modal-body">
<div class="magic-link-confirmation--image">
<div class="magic-link-confirmation--animation">
<div class="magic-link-confirmation--animation-elements">
<div class="magic-link-confirmation--animation-email"></div>
<div class="magic-link-confirmation--animation-email-shadow">
<img src="/libs/images/basketlink/email-shadow.svg">
</div>
<div class="magic-link-confirmation--animation-mobile"></div>
<div class="magic-link-confirmation--animation-mobile-shadow">
<img src="/libs/images/basketlink/mobile-shadow.svg">
</div>
<div class="magic-link-confirmation--animation-tablet"></div>
<div class="magic-link-confirmation--animation-tablet-shadow">
<img src="/libs/images/basketlink/tablet-shadow.svg">
</div>
<div class="magic-link-confirmation--animation-desktop"></div>
<div class="magic-link-confirmation--animation-desktop-shadow">
<img src="/libs/images/basketlink/desktop-shadow.svg">
</div>
</div>
<div class="magic-link-confirmation--animation-fallback">
<img src="/libs/images/basketlink/magic-link-animation-fallback.png">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<form action="/basket/" method="POST" class="controls" id="BasketMagicLinkForm">
<input name="antispam" type="hidden" value="{$smarty.now}" />
<input name="action" type="hidden" value="magiclink" />
<input name="tmpl" type="hidden" value="magiclink" />
<div class="form-group">
<div class="input-group">
<input type="text" class="form-control" name="email" autocomplete=off value="" placeholder="Введите электронную почту" />
<span class="input-group-btn">
<button type="submit" class="btn btn-coupon">Отослать</button>
</span>
</div>
</div>
</form>
<script>
$(document).ready(function()
{
$('#BasketMagicLinkForm').ContactForm(
{
ok : 'Выслана на емейл',
color : 'white',
callback : function()
{
$('#BasketMagicLinkForm').append('<h4 align="center" class="well">На указанный адрес отправлена ссылка на корзину</h4>');
$('#BasketMagicLinkForm').css('min-height', '0px');
setTimeout( function(){ $('#BasketMagicLink').modal('hide'); }, 1500 );
}
}
);
});
</script>
</div>
</div>
</div>
</div>
<link href="/libs/css/basketlink.css" type="text/css" rel="stylesheet">
{/if}
{if sizeof($basketdata)}
<h1>Оформление заказа</h1>
<div class="content wide orderform-content">
<a name="order-form"></a>
<h1>Оформление заказа</h1>
{include file="$TMPL_FOLDER/mod/basket/order-form.html"}
</div>
{else}
<div class="basket-content content wide">
<p align="center">У вас нет отложенных в корзину товаров.</p>
</div>
{/if}
{/if}
<div class="content wide">
{include file="$TMPL_FOLDER/mod/ObjectsConnected.html"}
{include file="$TMPL_FOLDER/mod/ObjectsAttached.html"}
View
@@ -1,4 +1,10 @@
{combinejs input=array("/media0/js/jquery.cookie.js", "/libs/js/bootstrap.js", '/libs/js/jquery.lazyload.js', '/libs/js/fn.bookmarks.js', "/libs/js/fn.mask.js", "/libs/js/fn.inputmask.js", "/media0/js/jquery.form.js", "/libs/js/fn.expandarea.js", "/media0/js/jquery.comments.js", "/libs/js/application.js","/media0/js/jquery.cart.1.2.js", "/media0/js/jquery.validator.js", "/media0/js/jquery.fancybox.pack.js", "/libs/js/jquery.elevatezoom.js", '/libs/js/product.js') output='alboms/all.js' age='31'}
{combinejs input=array("/media0/js/jquery.cookie.js", "/libs/js/bootstrap.js", '/libs/js/jquery.lazyload.js', '/libs/js/fn.bookmarks.js', "/libs/js/fn.mask.js", "/libs/js/fn.inputmask.js", "/media0/js/jquery.form.js", "/libs/js/fn.expandarea.js", "/media0/js/jquery.comments.js", "/media0/js/jquery.validator.js", "/media0/js/jquery.fancybox.pack.js", "/libs/js/jquery.elevatezoom.js", '/libs/js/product.js' ) output='alboms/all.js' age='31'}
<script type="text/javascript" src="/libs/js/application.js"></script>
<script type="text/javascript" src="/libs/js/jquery.cart.2.js"></script>
<script type="text/javascript" src="/libs/js/fn.sticky.js"></script>
<script type="text/javascript" src="/libs/js/ContactForm.js"></script>
<!--[if lt IE 10]>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.1/jquery.xdomainrequest.min.js"></script>
@@ -25,7 +25,6 @@
$.basket.onsubmit( $('.basket-form') , 'abs', '#absbasket-box .modal-body', function(html)
{
me.data('product', 'ADDED');
$.ajax({
type : me.attr('method') || 'POST',
dataType: 'json',
@@ -34,11 +33,10 @@
data : me.serialize(),
success: function( result )
{
//console.log(result);
if ( result.success )
{
Mask.remove();
me.children('.h3').html( '{$basketextendedfastform_success|default:'Спасибо за заказ!'}. Номер вашего заказа ' + result.order_id + '. Сумма заказа ' + result.total + '' );
Mask.remove();
}
else
{
@@ -48,6 +46,7 @@
me.data('product', '');
}
});
});
return false;
}
@@ -0,0 +1 @@
{literal}{{/literal}"success":true,"order_id":{$order_id},"total":"{$order_total|price}"{literal}}{/literal}
Oops, something went wrong.

0 comments on commit 18c8d3d

Please sign in to comment.