[+] Project : default theme added
This commit is contained in:
@@ -75,7 +75,26 @@
|
||||
$.ajax({
|
||||
{/literal}url: "{$module_dir}productcomments-ajax.php",{literal}
|
||||
post: "POST",
|
||||
data: {action: 'sendComment', secure_key: '{/literal}{$secure_key}{literal}', review: JSON.stringify(datas)},{/literal}{literal}
|
||||
data: {action: 'sendComment', secure_key: '{/literal}{$secure_key}{literal}', review: JSON.stringify(datas)},
|
||||
dataType: "json",
|
||||
success: function(result){
|
||||
$.fancybox.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#submitNewMessage').click(function(){
|
||||
var datas = [];
|
||||
$('#fancybox-content').find('input, textarea, select').each(function(index){
|
||||
var o = {}
|
||||
o.key = $(this).attr('name');
|
||||
o.value = $(this).val();
|
||||
datas.push(o);
|
||||
});
|
||||
$.ajax({
|
||||
{/literal}url: "{$module_dir}productcomments-ajax.php",{literal}
|
||||
post: "POST",
|
||||
data: {action: 'sendComment', secure_key: '{/literal}{$secure_key}{literal}', review: JSON.stringify(datas)},
|
||||
dataType: "json",
|
||||
success: function(result){
|
||||
$.fancybox.close();
|
||||
@@ -123,22 +142,22 @@
|
||||
|
||||
<div class="new_comment_form_content">
|
||||
<p class="intro_form">{l s='Write your review' mod='productcomments'}</p>
|
||||
{if $criterions|@count > 0}
|
||||
<div class="grade_content clearfix">
|
||||
{section loop=$criterions name=i start=0 step=1}
|
||||
<span>
|
||||
<input type="hidden" name="id_product_comment_criterion_{$smarty.section.i.iteration}" value="{$criterions[i].id_product_comment_criterion|intval}" />
|
||||
{$criterions[i].name|escape:'html':'UTF-8'}:
|
||||
</span>
|
||||
<div class="star_content">
|
||||
<input class="star" type="radio" name="{$smarty.section.i.iteration}_grade" id="{$smarty.section.i.iteration}_grade" value="1" />
|
||||
<input class="star" type="radio" name="{$smarty.section.i.iteration}_grade" value="2" />
|
||||
<input class="star" type="radio" name="{$smarty.section.i.iteration}_grade" value="3" checked="checked" />
|
||||
<input class="star" type="radio" name="{$smarty.section.i.iteration}_grade" value="4" />
|
||||
<input class="star" type="radio" name="{$smarty.section.i.iteration}_grade" value="5" />
|
||||
{if $criterions|@count > 0}
|
||||
<div class="grade_content clearfix">
|
||||
{section loop=$criterions name=i start=0 step=1}
|
||||
<span>
|
||||
<input type="hidden" name="id_product_comment_criterion_{$smarty.section.i.iteration}" value="{$criterions[i].id_product_comment_criterion|intval}" />
|
||||
{$criterions[i].name|escape:'html':'UTF-8'}:
|
||||
</span>
|
||||
<div class="star_content">
|
||||
<input class="star" type="radio" name="{$smarty.section.i.iteration}_grade" id="{$smarty.section.i.iteration}_grade" value="1" />
|
||||
<input class="star" type="radio" name="{$smarty.section.i.iteration}_grade" value="2" />
|
||||
<input class="star" type="radio" name="{$smarty.section.i.iteration}_grade" value="3" checked="checked" />
|
||||
<input class="star" type="radio" name="{$smarty.section.i.iteration}_grade" value="4" />
|
||||
<input class="star" type="radio" name="{$smarty.section.i.iteration}_grade" value="5" />
|
||||
</div>
|
||||
{/section}
|
||||
</div>
|
||||
{/section}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form_contenair">
|
||||
<p class="text">
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#product_comments_block_extra {
|
||||
padding-top:10px;
|
||||
padding:10px 0;
|
||||
padding:10px 0;
|
||||
border-top:1px solid #ccc;
|
||||
border-bottom:1px solid #ccc;
|
||||
font-weight: bold;
|
||||
font-size:12px;
|
||||
line-height:18px
|
||||
|
||||
@@ -705,6 +705,7 @@ class ProductComments extends Module
|
||||
|
||||
Context::getContext()->smarty->assign(array(
|
||||
'id_product_comment_form' => (int)Tools::getValue('id_product'),
|
||||
'product' => new Product(Tools::getValue('id_product'), false, Context::getContext()->language->id),
|
||||
'secure_key' => $this->secure_key,
|
||||
'logged' => (int)Context::getContext()->customer->isLogged(true),
|
||||
'allow_guests' => (int)Configuration::get('PRODUCT_COMMENTS_ALLOW_GUESTS'),
|
||||
@@ -760,8 +761,6 @@ class ProductComments extends Module
|
||||
'nbComments' => (int)ProductComment::getCommentNumber((int)Tools::getValue('id_product'))
|
||||
));
|
||||
|
||||
|
||||
|
||||
return ($this->display(__FILE__, '/productcomments.tpl'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user