// Context part 31
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<a href="#idTab5">{l s='Read user reviews' mod='productcomments'} ({$nbComments})</a><br/>
|
||||
{if ($too_early == false AND ($cookie->isLogged() OR $allow_guests))}
|
||||
{if ($too_early == false AND ($logged OR $allow_guests))}
|
||||
<a id="new_comment_btn" href="#new_comment_form">{l s='Give your advice' mod='productcomments'}</a>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -111,7 +111,7 @@
|
||||
<input name="title" type="text" value=""/><br/>
|
||||
<label for="content">{l s='Comment' mod='productcomments'} *:</label>
|
||||
<textarea name="content"></textarea>
|
||||
{if $allow_guests == true && $cookie->isLogged() == false}
|
||||
{if $allow_guests == true && $logged == 0}
|
||||
<label>{l s='Your name:' mod='productcomments'} *:</label>
|
||||
<input name="customer_name" type="text" value=""/><br/>
|
||||
{/if}
|
||||
|
||||
@@ -606,7 +606,7 @@ class ProductComments extends Module
|
||||
$image = Product::getCover((int)($_GET['id_product']));
|
||||
|
||||
Context::getContext()->smarty->assign(array(
|
||||
'logged' => (int)Context::getContext()->cookie->id_customer,
|
||||
'logged' => (int)Context::getContext()->customer->isLogged(true),
|
||||
'allow_guests' => (int)Configuration::get('PRODUCT_COMMENTS_ALLOW_GUESTS'),
|
||||
'productcomment_cover' => (int)Tools::getValue('id_product').'-'.(int)$image['id_image'],
|
||||
'mediumSize' => Image::getSize('medium'),
|
||||
@@ -690,7 +690,7 @@ class ProductComments extends Module
|
||||
$averageTotal = count($averages) ? ($averageTotal / count($averages)) : 0;
|
||||
|
||||
Context::getContext()->smarty->assign(array(
|
||||
'logged' => (int)Context::getContext()->cookie->id_customer,
|
||||
'logged' => (int)Context::getContext()->customer->isLogged(true),
|
||||
'action_url' => '',
|
||||
'comments' => ProductComment::getByProduct((int)Tools::getValue('id_product'), 1, null, Context::getContext()->cookie->id_customer),
|
||||
'criterions' => ProductCommentCriterion::getByProduct((int)Tools::getValue('id_product'), Context::getContext()->language->id),
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
{if $comment.total_advice > 0}
|
||||
<li>{$comment.total_useful} {l s='out of' mod='productcomments'} {$comment.total_advice} {l s='people found this review useful' mod='productcomments'}</li>
|
||||
{/if}
|
||||
{if $cookie->isLogged() == true}
|
||||
{if $logged == 1}
|
||||
{if !$comment.customer_advice}
|
||||
<li>{l s='Was this comment useful to you?' mod='productcomments'}<button class="usefulness_btn" id="comment_useful_yes_{$comment.id_product_comment}">{l s='yes' mod='productcomments'}</button><button class="usefulness_btn" id="comment_useful_no_{$comment.id_product_comment}">{l s='no' mod='productcomments'}</button></li>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user