// w3C product

This commit is contained in:
Kevin Granger
2013-12-09 14:26:17 +01:00
parent 27e8beb6a9
commit 91c3bf48b1
2 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -750,7 +750,7 @@ $(document).ready(function(){
// The button to increment the product value
$('.product_quantity_up').click(function(e){
e.preventDefault();
fieldName = $(this).attr('rel');
fieldName = $(this).data('field-qty');
var currentVal = parseInt($('input[name='+fieldName+']').val());
if (quantityAvailable > 0) {
quantityAvailableT = quantityAvailable;
@@ -767,7 +767,7 @@ $(document).ready(function(){
// The button to decrement the product value
$(".product_quantity_down").click(function(e) {
e.preventDefault();
fieldName = $(this).attr('rel');
fieldName = $(this).data('field-qty');
var currentVal = parseInt($('input[name='+fieldName+']').val());
if (!isNaN(currentVal) && currentVal > 1) {
$('input[name='+fieldName+']').val(currentVal - 1).trigger('keyup');
+14 -14
View File
@@ -265,7 +265,7 @@
rel="{literal}{{/literal}gallery: 'gal1', smallimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'large_default')|escape:'html'}',largeimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html'}'{literal}}{/literal}"
{else}
href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html'}"
rel="other-views"
data-fancybox-group="other-views"
class="thickbox{if $smarty.foreach.thumbnails.first} shown{/if}"
{/if}
title="{$imageTitlte}">
@@ -482,10 +482,10 @@
value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}"
maxlength="3"
{if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} />
<a href="#" rel="qty" class="btn btn-default button-minus product_quantity_down">
<a href="#" data-field-qty="qty" class="btn btn-default button-minus product_quantity_down">
<span><i class="icon-minus"></i></span>
</a>
<a href="#" rel="qty" class="btn btn-default button-plus product_quantity_up ">
<a href="#" data-field-qty="qty" class="btn btn-default button-plus product_quantity_up ">
<span><i class="icon-plus"></i></span>
</a>
<span class="clearfix"></span>
@@ -507,7 +507,7 @@
{foreach from=$groups key=id_attribute_group item=group}
{if $group.attributes|@count}
<fieldset class="attribute_fieldset">
<label class="attribute_label" for="group_{$id_attribute_group|intval}">{$group.name|escape:'html':'UTF-8'} :&nbsp;</label>
<label class="attribute_label" {if $group.group_type != 'color' and $group.group_type != 'radio'}for="group_{$id_attribute_group|intval}"{/if}>{$group.name|escape:'html':'UTF-8'} :&nbsp;</label>
{assign var="groupName" value="group_$id_attribute_group"}
<div class="attribute_list">
{if ($group.group_type == 'select')}
@@ -520,16 +520,16 @@
<ul id="color_to_pick_list" class="clearfix">
{assign var="default_colorpicker" value=""}
{foreach from=$group.attributes key=id_attribute item=group_attribute}
<li{if $group.default == $id_attribute} class="selected"{/if}>
<a id="color_{$id_attribute|intval}" class="color_pick{if ($group.default == $id_attribute)} selected{/if}" style="background: {$colors.$id_attribute.value};" title="{$colors.$id_attribute.name}" onclick="colorPickerClick(this);getProductAttribute();">
{if file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}
<img src="{$img_col_dir}{$id_attribute}.jpg" alt="{$colors.$id_attribute.name}" width="20" height="20" /><br />
{/if}
</a>
</li>
{if ($group.default == $id_attribute)}
{$default_colorpicker = $id_attribute}
{/if}
<li{if $group.default == $id_attribute} class="selected"{/if}>
<a id="color_{$id_attribute|intval}" class="color_pick{if ($group.default == $id_attribute)} selected{/if}" style="background: {$colors.$id_attribute.value};" title="{$colors.$id_attribute.name}" onclick="colorPickerClick(this);getProductAttribute();">
{if file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}
<img src="{$img_col_dir}{$id_attribute}.jpg" alt="{$colors.$id_attribute.name}" width="20" height="20" />
{/if}
</a>
</li>
{if ($group.default == $id_attribute)}
{$default_colorpicker = $id_attribute}
{/if}
{/foreach}
</ul>
<input type="hidden" class="color_pick_hidden" name="{$groupName}" value="{$default_colorpicker}" />