From 53b91fc0b7f5f8bd228c3f57c46fca1670100b3d Mon Sep 17 00:00:00 2001 From: gRoussac Date: Tue, 26 Nov 2013 11:27:25 +0100 Subject: [PATCH] attribute_anchor_separator --- themes/default-bootstrap/js/product.js | 39 +++++++++++++++-------- themes/default-bootstrap/product-list.tpl | 2 +- themes/default-bootstrap/product.tpl | 22 ++++++++----- 3 files changed, 41 insertions(+), 22 deletions(-) diff --git a/themes/default-bootstrap/js/product.js b/themes/default-bootstrap/js/product.js index fabe6968d..2f32a252f 100644 --- a/themes/default-bootstrap/js/product.js +++ b/themes/default-bootstrap/js/product.js @@ -375,8 +375,16 @@ function updateDisplay() productPriceDisplay = ps_round(productPriceDisplay * group_reduction, 2); var ecotaxAmount = !displayPrice ? ps_round(selectedCombination['ecotax'] * (1 + ecotaxTax_rate / 100), 2) : selectedCombination['ecotax']; - productPriceDisplay += ecotaxAmount; - productPriceWithoutReductionDisplay += ecotaxAmount; + + if (ecotaxAmount != default_eco_tax) + productPriceDisplay += ecotaxAmount - default_eco_tax; + else + productPriceDisplay += ecotaxAmount; + + if (ecotaxAmount != default_eco_tax) + productPriceWithoutReductionDisplay += ecotaxAmount - default_eco_tax; + else + productPriceWithoutReductionDisplay += ecotaxAmount; var our_price = ''; if (productPriceDisplay > 0) { @@ -417,14 +425,20 @@ function displayImage(domAAroundImgThumb, no_animation) { if (typeof(no_animation) == 'undefined') no_animation = false; - if (domAAroundImgThumb.attr('href')) + if (domAAroundImgThumb.prop('href')) { - var newSrc = domAAroundImgThumb.attr('href').replace('thickbox', 'large'); - if ($('#bigpic').attr('src') != newSrc) + var new_src = domAAroundImgThumb.prop('href').replace('thickbox', 'large'); + var new_title = domAAroundImgThumb.prop('title'); + var new_href = domAAroundImgThumb.prop('href'); + if ($('#bigpic').prop('src') != new_src) { - $('#bigpic').attr('src', newSrc).load(function() { + $('#bigpic').prop({ + 'src' : new_src, + 'alt' : new_title, + 'title' : new_title + }).load(function(){ if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled) - $(this).attr('rel', domAAroundImgThumb.attr('href')); + $(this).prop('rel', new_href); }); } $('#views_block li a').removeClass('shown'); @@ -490,8 +504,7 @@ function refreshProductImages(id_product_attribute) $('#wrapResetImages').hide('slow'); } - var thumb_width = $('#thumbs_list_frame >li').width() + parseInt($('#thumbs_list_frame >li').css('marginRight')) + 1; - + var thumb_width = $('#thumbs_list_frame >li').width() + parseInt($('#thumbs_list_frame >li').css('marginRight')); $('#thumbs_list_frame').width((parseInt((thumb_width) * $('#thumbs_list_frame >li').length)) + 'px'); $('#thumbs_list').trigger('goto', 0); serialScrollFixLock('', '', '', '', 0);// SerialScroll Bug on goto 0 ? @@ -511,7 +524,7 @@ $(document).ready(function() stop:true, onBefore:serialScrollFixLock, duration:700, - step: 1, + step: 2, lazy: true, lock: false, force:false, @@ -570,14 +583,14 @@ $(document).ready(function() $('#resetImages').click(function() { refreshProductImages(0); }); - if (contentOnly == false) + if (contentOnly == false) $('.thickbox').fancybox({ 'hideOnContentClick': true, 'transitionIn' : 'elastic', 'transitionOut' : 'elastic' }); - else - $('.thickbox').click(function(){return false}) + else + $('.thickbox').click(function(){return false}); }); function saveCustomization() diff --git a/themes/default-bootstrap/product-list.tpl b/themes/default-bootstrap/product-list.tpl index dbad52a54..25256afaa 100644 --- a/themes/default-bootstrap/product-list.tpl +++ b/themes/default-bootstrap/product-list.tpl @@ -51,7 +51,7 @@
- {$product.legend|escape:'html':'UTF-8'} + {if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if} {if isset($quick_view) && $quick_view}Quick view{/if} {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} diff --git a/themes/default-bootstrap/product.tpl b/themes/default-bootstrap/product.tpl index f3794f99e..73724e081 100644 --- a/themes/default-bootstrap/product.tpl +++ b/themes/default-bootstrap/product.tpl @@ -197,8 +197,9 @@ var contentOnly = {if $content_only}true{else}false{/if} {if $have_image} - {$product->name|escape:'html':'UTF-8'} + {if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if} {if !$content_only}{l s='View larger'}{/if} + {else} @@ -213,16 +214,21 @@ var contentOnly = {if $content_only}true{else}false{/if} {if isset($images) && count($images) > 3}{l s='Previous'}{/if}
{if isset($images) && count($images) > 3}{l s='Next'}{/if}