[-] MO : #PSFV-622 : BugFix on products comments module

This commit is contained in:
François Gaillard
2012-03-06 10:47:11 +00:00
parent 1ca413d567
commit 1f0dbd40ff
5 changed files with 20 additions and 10 deletions
@@ -155,7 +155,7 @@ class ProductCommentCriterion extends ObjectModel
LEFT JOIN `'._DB_PREFIX_.'product_comment_criterion_product` pccp ON (pcc.`id_product_comment_criterion` = pccp.`id_product_comment_criterion` AND pccp.`id_product` = '.(int)$id_product.')
LEFT JOIN `'._DB_PREFIX_.'product_comment_criterion_category` pccc ON (pcc.`id_product_comment_criterion` = pccc.`id_product_comment_criterion`)
LEFT JOIN `'._DB_PREFIX_.'product'.$table.'` '.$alias.' ON ('.$alias.'.id_category_default = pccc.id_category AND '.$alias.'.id_product = '.(int)$id_product.')
WHERE pccl.`id_lang` = '.(int)($id_lang).' AND (pccp.id_product IS NOT NULL OR p.id_product IS NOT NULL OR pcc.id_product_comment_criterion_type = 1) AND pcc.active = 1
WHERE pccl.`id_lang` = '.(int)($id_lang).' AND (pccp.id_product IS NOT NULL OR ps.id_product IS NOT NULL OR pcc.id_product_comment_criterion_type = 1) AND pcc.active = 1
GROUP BY pcc.id_product_comment_criterion');
}
@@ -1,4 +1,4 @@
{*
{*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
@@ -86,7 +86,12 @@
data: {action: 'sendComment', secure_key: '{/literal}{$secure_key}{literal}', review: JSON.stringify(datas)},
dataType: "json",
success: function(result){
$.fancybox.close();
if (result == 0) {
alert('{/literal}{l s='Your comment can not be posted. Please fill in all required fields.' mod='productcomments'}{literal}');
} else {
location.reload( true );
$.fancybox.close();
}
}
});
});
@@ -105,7 +110,12 @@
data: {action: 'sendComment', secure_key: '{/literal}{$secure_key}{literal}', review: JSON.stringify(datas)},
dataType: "json",
success: function(result){
$.fancybox.close();
if (result == 0) {
alert('{/literal}{l s='Your comment can not be posted. Please fill in all required fields.' mod='productcomments'}{literal}');
} else {
location.reload( true );
$.fancybox.close();
}
}
});
});
@@ -180,7 +190,7 @@
</p>
{if $allow_guests == true && $logged == 0}
<p class="text">
<label>{l s='Your name:' mod='productcomments'} <sup>*</sup>:</label>
<label>{l s='Your name' mod='productcomments'} <sup>*</sup>:</label>
<input id="commentCustomerName" name="customer_name" type="text" value=""/>
</p>
{/if}
+3 -3
View File
@@ -108,14 +108,14 @@
height: 28px;
width: 540px;
border: 1px solid #ccc;
background: url(../img/bg_input.png) repeat-x scroll 0 0 #fff;
background: #fff;
}
#new_comment_form p.textarea textarea {
padding: 0 5px;
height: 80px;
width: 540px;
border: 1px solid #ccc;
background: url(../img/bg_input.png) repeat-x scroll 0 0 #fff;
background: #fff;
}
#new_comment_form .submit {
@@ -133,7 +133,7 @@
border-radius: 3px 3px 3px 3px;
font-weight: bold;
color: #000;
background: url(../img/bg_bt.gif) repeat-x scroll 0 0 #F4B61B
background: url(img/bg_bt.gif) repeat-x scroll 0 0 #F4B61B
}
#new_comment_form .submit .txt_required {
float:left;
+1 -1
View File
@@ -203,7 +203,7 @@
</p>
{if $allow_guests == true && $logged == 0}
<p class="text">
<label>{l s='Your name:' mod='productcomments'} <sup>*</sup>:</label>
<label>{l s='Your name' mod='productcomments'} <sup>*</sup>:</label>
<input id="commentCustomerName" name="customer_name" type="text" value=""/>
</p>
{/if}
@@ -57,7 +57,7 @@
</tr>
{foreach from=$grades item=grade key=grade_id}
<tr>
<tr>
{cycle values='comparison_feature_odd,comparison_feature_even' assign='classname'}
<td class="{$classname}">
{$grade}