attribute_anchor_separator

This commit is contained in:
gRoussac
2013-11-26 11:27:25 +01:00
parent 8a7d39d800
commit 53b91fc0b7
3 changed files with 41 additions and 22 deletions
+26 -13
View File
@@ -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()
+1 -1
View File
@@ -51,7 +51,7 @@
<div class="left-block">
<div class="product-image-container">
<a href="{$product.link|escape:'html':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'html':'UTF-8'}">
<img class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html'}" alt="{$product.legend|escape:'html':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} />
<img itemprop="image" class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html'}" alt="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" title="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} />
</a>
{if isset($quick_view) && $quick_view}<a href="#" rel="{$product.link|escape:'html':'UTF-8'}" class="quick-view"><span>Quick view</span></a>{/if}
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
+14 -8
View File
@@ -197,8 +197,9 @@ var contentOnly = {if $content_only}true{else}false{/if}
{if $have_image}
<span id="view_full_size">
<img itemprop="image" src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')|escape:'html'}"{if $jqZoomEnabled && $have_image} class="jqzoom"{/if} title="{$product->name|escape:'html':'UTF-8'}" alt="{$product->name|escape:'html':'UTF-8'}" id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}"/>
<img itemprop="image" src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')|escape:'html'}"{if $jqZoomEnabled && $have_image} class="jqzoom"{/if} title="{if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if}" alt="{if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if}" id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}"/>
{if !$content_only}<span class="span_link">{l s='View larger'}</span>{/if}
</span>
{else}
<span id="view_full_size">
@@ -213,16 +214,21 @@ var contentOnly = {if $content_only}true{else}false{/if}
{if isset($images) && count($images) > 3}<span class="view_scroll_spacer"><a id="view_scroll_left" class="" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">{l s='Previous'}</a></span>{/if}
<div id="thumbs_list">
<ul id="thumbs_list_frame">
{if isset($images)}
{foreach from=$images item=image name=thumbnails}
{if isset($images)}
{foreach from=$images item=image name=thumbnails}
{assign var=imageIds value="`$product->id`-`$image.id_image`"}
<li id="thumbnail_{$image.id_image}" {if $smarty.foreach.thumbnails.last} class="last"{/if} >
<a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html'}" rel="other-views" class="thickbox{if $smarty.foreach.thumbnails.first} shown{/if}" title="{$image.legend|htmlspecialchars}">
<img id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'medium_default')|escape:'html'}" alt="{$image.legend|htmlspecialchars}" height="{$mediumSize.height}" width="{$mediumSize.width}" />
{if !empty($image.legend)}
{assign var=imageTitlte value=$image.legend|escape:'html'}
{else}
{assign var=imageTitlte value=$product->name|escape:'html'}
{/if}
<li id="thumbnail_{$image.id_image}"{if $smarty.foreach.thumbnails.last} class="last"{/if}>
<a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html'}" rel="other-views" class="thickbox{if $smarty.foreach.thumbnails.first} shown{/if}" title="{$imageTitlte}">
<img class="img-responsive" id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'medium_default')|escape:'html'}" alt="{$imageTitlte}" title="{$imageTitlte}" height="{$mediumSize.height}" width="{$mediumSize.width}" itemprop="image" />
</a>
</li>
{/foreach}
{/if}
{/foreach}
{/if}
</ul>
</div>
{if isset($images) && count($images) > 3}<a id="view_scroll_right" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">{l s='Next'}</a>{/if}