Merge branch 'ticket-14904-achatexpressmobile' into develop

This commit is contained in:
Michael RICOIS 2017-12-12 15:12:57 +01:00
commit b373bf64e8
3 changed files with 20 additions and 6 deletions

View File

@ -47,6 +47,23 @@
{/if}
{/if}
{/if}
<div style="float:right; width:40%;">
{if isset($product.quantity_all_versions)}
{if $product.quantity_all_versions <= 0 && $product.quantity <= 0}
{else}
<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}?add&amp;id_product={$product.id_product|intval}{if isset($static_token)}&amp;token={$static_token}{/if}" title="{l s='Express buy'}">
</a>
{/if}
{else}
{if $product.quantity <= 0}
{else}
<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}?add&amp;id_product={$product.id_product|intval}{if isset($static_token)}&amp;token={$static_token}{/if}" title="{l s='Express buy'}">
</a>
{/if}
{/if}
</div>
{* <span class="gradient">
<a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'|escape:'htmlall':'UTF-8'}">
<img src="{$img_dir}arrow-blank.png" alt="{$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'|escape:'htmlall':'UTF-8'}" />

View File

@ -1,6 +1,5 @@
<script type="text/javascript">{literal}
function hideExpressCart(event){
console.log('hideExpressCart');
if($(".button.expresscart.active").parent().parent().has($(event.target)).length == 0 || $(".button.expresscart.active") == $(event.target)) {
event.data.m.removeClass('active');
$(".expresscart_frame").hide();
@ -13,8 +12,6 @@ function hideExpressCart(event){
}
function showExpressCart(event) {
console.log('showExpressCart');
var m = $(event.target);
m.toggleClass('active');
@ -46,7 +43,7 @@ function showExpressCart(event) {
}
function initButtons() {
$('.button.ajax_add_to_cart_button.exclusive:visible').hide()
$('.button.ajax_add_to_cart_button.exclusive').hide()
.after("{/literal}<a title=\"{l s='Express cart' mod='expresscart'}\" onclick=\"showExpressCart(event); return false;\" class=\"button expresscart\"></a><div style=\"display:none;\" class=\"expresscart_frame\"><p class=\"loading\"><img src=\"{$img_dir|replace:'"':'"'}ajax-loader.gif\" alt=\"\" /></p></div>{literal}");
}