Jump to content

Не работают отзывы о товаре


Recommended Posts

При добавлении отзыва, в окне отзыва открывается стартовая страница

product.tpl

 

 

<div class="main_container catalog-detail">

<div class="breadcrumb">
    <a href="./">NewToys.su</a>
    {foreach from=$category->path item=cat}
    <i> » </i><a href="catalog/{$cat->url}">{$cat->name|escape}</a>
    {/foreach}
    {if $brand}
    <i> » </i><a href="catalog/{$cat->url}/{$brand->url}">{$brand->name|escape}</a>
    {/if}
    <i> » </i>{$product->name|escape}                


</div>





<div id="catalog-detail" class="catalogDetail product">
    <div class="product_gallery image">
        
        <div class="detail_picture {if $product->featured} hits{/if}">
            <div class="ribbon"></div>

            
            <img alt="{$product->meta_title|escape}" title="{$product->meta_title|escape}" src="{$product->image->filename|resize:350:350}" class="js-view-port">
            <a id="detail-zoom{$image->id}" class="js-fancybox zoom active js-zoomer" href="{$product->image->filename|resize:800:600}" rel="galery"></a>
            {if $product->images|count>1}
            {foreach $product->images|cut:0 as $i=>$image}
            <a id="detail-zoom{$image->id}" class="js-fancybox zoom active js-zoomer" href="{$image->filename|resize:800:600}" rel="galery"></a>
            

           
            

        </div>
        
        <div class="previews">
            
            <ul>
                
            
                <li class="js-preview" rel="#detail-zoom{$image->id}" data-img="{$image->filename|resize:350:350}">
                <img alt="{$product->model|escape}" title="{$product->model|escape}" src="{$image->filename|resize:96:96}"></li>
                         {/foreach}
                    
                

                
            </ul>
            {/if}
            <div class="clear"></div>
        </div>
    </div>
    <div class="product_description">
        <h1 data-product="{$product->id}">{$product->name|escape}</h1>

        <div class="text_content description">
{$product->annotation}
        </div>




        
                     {if $product->variants|count > 0}
                    <div class="on_stock">Товар в наличии</div>
            
            
        
        
                <div class="price">
                            
                    <!-- Выбор варианта товара -->
        <form class="variants" action="/cart">
            
            {foreach $product->variants as $v}
        <input  id="featured_{$v->id}" name="variant" value="{$v->id}" type="radio"  {if $v@first}checked{/if} style="display:none;"/>
        {/foreach}
            
            <table>
            
            <tr class="variant">
            
                <td>
                    {if $v->compare_price > 0}<span class="compare_price">{$v->compare_price|convert}</span>{/if}
                    <br><b>{$v->price|convert}</b> {$currency->sign|escape}
                </td>
            </tr>
        
            </table>
            <input type="submit" value="" class="btn_buy  fright" />
        </form>
        <!-- Выбор варианта товара (The End) -->
        </div>
        
        
        
{else}
            Нет в наличии
        {/if}



    </div>
    <div class="clear"></div>
        
     <div class="share42init"></div>
<meta content="{$product->image->filename|resize:200:300}" property="og:image">     
<script type="text/javascript" src="http://newtoys.su/share42/share42.js"></script>







    <div class="js-tabs tabs">
        <div class="tabs-caption">
            <ul>
                <li rel="#tab-content1" class="tab-switcher js-tab-switcher"><span>Характеристики</span></li>
                <li rel="#tab-content2" class="tab-switcher js-tab-switcher "><span>Отзывы</span></li>
                <li rel="#tab-content3" class="tab-switcher js-tab-switcher active"><span>Описание</span></li>
            </ul>
            <div class="border"></div>
            <div class="clear"></div>
        </div>


        <div id="tab-content1" class="tab-content active js-tab-content" style="display: none;">
            <div class="specifications">
                {foreach $product->features as $f}
                <div class="item">
                    <div class="name">{$f->name}</div>
                    <div class="value">{$f->value}</div>
                </div>
                {/foreach}


                
                            </div>
        </div>


        <div id="tab-content2" class="tab-content js-tab-content" style="display: block;">
            
    <div id="comments" class="comment js-review reviews contentViewer">

    <!-- Комментарии -->
<div id="comments">

    <h2>Комментарии</h2>
    
    {if $comments}
    <!-- Список с комментариями -->
    <ul class="comment_list">
        {foreach $comments as $comment}
        <a name="comment_{$comment->id}"></a>
        <li>
            <!-- Имя и дата комментария-->
            <div class="comment_header">    
                {$comment->name|escape} <i>{$comment->date|date}, {$comment->date|time}</i>
                {if !$comment->approved}ожидает модерации</b>{/if}
            </div>
            <!-- Имя и дата комментария (The End)-->
            
            <!-- Комментарий -->
            {$comment->text|escape|nl2br}
            <!-- Комментарий (The End)-->
        </li>
        {/foreach}
    </ul>
    <!-- Список с комментариями (The End)-->
    {else}
    <p>
        Пока нет комментариев
    </p>
    {/if}
    
    <!--Форма отправления комментария-->    
    <form class="comment_form" method="post">
        <h2>Написать комментарий</h2>
        {if $error}
        <div class="message_error">
            {if $error=='captcha'}
            Неверно введена капча
            {elseif $error=='empty_name'}
            Введите имя
            {elseif $error=='empty_comment'}
            Введите комментарий
            {/if}
        </div>
        {/if}
        <textarea class="comment_textarea" id="comment_text" name="text" data-format=".+" data-notice="Введите комментарий">{$comment_text}</textarea><br />
        <div>
        <label for="comment_name">Имя</label>
        <input class="input_name" type="text" id="comment_name" name="name" value="{$comment_name}" data-format=".+" data-notice="Введите имя"/><br />

        
        
        <label for="comment_captcha">Число</label>
        <div class="captcha"><img src="captcha/image.php?{math equation='rand(10,10000)'}" alt='captcha'/></div>
        <input class="input_captcha" id="comment_captcha" type="text" name="captcha_code" value="" data-format="\d\d\d\d" data-notice="Введите капчу"/>
        
        </div>
        
        <input class="submit_coment" type="submit" name="comment" value="Отправить" />
    </form>
    <!--Форма отправления комментария (The End)-->
    
</div>
<!-- Комментарии (The End) -->

    </div>




        </div>

        <div id="tab-content3" class="tab-content js-tab-content" style="display: none;">
            <div class="text_content">
{$product->body}
            </div>
        </div>
    </div>

</div>








{* Связанные товары *}
{if $related_products}
<div class="catalog recomend">
    <div class="title">
        <h2><span>С этим товаром покупают</span></h2>
        
            
    
    </div>
    
<div class="products_list">

{foreach $related_products as $product}
    <div  class="product_item {if $product->featured}hits{/if} product">
        <div class="ribbon"></div>

        <div class="picture image">
            <a href="products/{$product->url}"><img src="{$product->image->filename|resize:120:120}" alt="{$product->name|escape}" /></a>
        </div>
<div class="product_title">
            <a data-product="{$product->id}" href="products/{$product->url}">{$product->name|escape}</a>
            {if $product->variants|count > 0}
        <!-- Выбор варианта товара -->
        <form class="variants" action="/cart">
            <table class="price">
            {foreach $product->variants as $v}
                <tr>
                <input id="new_{$v->id}" name="variant" value="{$v->id}" type="radio" class="variant_radiobutton" {if $v@first}checked{/if} {if $product->variants|count<2}style="display:none;"{/if}/>
                    {if $v->name}<label class="variant_name" for="featured_{$v->id}">{$v->name}</label>{/if}
                    <td rowspan="2" class="current_price">{$v->price|convert}</td>
                    <td class="old_price">{if $v->compare_price > 0}<span class="compare_price">{$v->compare_price|convert}</span>{/if}</td>
                </tr>
                <tr>
                    <td class="currency">{$currency->sign|escape}</td>
                </tr>
            {/foreach}
            </table>
            
        </div>
        
        <input class="btn_buy"  type="submit" value="Купить" />
        </form>
        <!-- Выбор варианта товара (The End) -->
        {else}
            Нет в наличии
        {/if}
    </div>
{/foreach}


    
</div>
</div>
{/if}













 
</div>
        <div class="clear"></div>

Link to post
Share on other sites

<form class="comment_form" method="post">
	<h2>Написать комментарий</h2>{if $error}
	<div class="message_error">{if $error=='captcha'}Неверно введена капча{elseif $error=='empty_name'}Введите имя{elseif $error=='empty_comment'}Введите комментарий{/if}</div>{/if}
	<textarea class="comment_textarea" id="comment_text" name="text" data-format=".+" data-notice="Введите комментарий">{$comment_text}</textarea>
	<br />
	<div>
		<label for="comment_name">Имя</label>
		<input class="input_name" type="text" id="comment_name" name="name" value="{$comment_name}" data-format=".+" data-notice="Введите имя" />
		<br />
		<label for="comment_captcha">Число</label>
		<div class="captcha">
			<img src="captcha/image.php?{math equation='rand(10,10000)'}" alt='captcha' />
		</div>
		<input class="input_captcha" id="comment_captcha" type="text" name="captcha_code" value="" data-format="\d\d\d\d" data-notice="Введите капчу" />
	</div>
	<input class="submit_coment" type="submit" name="comment" value="Отправить" />
</form>

Какое нах "окно отзыва" ??

Ты дал HTML и все, в HTML проблем нет.

Че у тебя js делает одному богу известно, а выше видно

<div id="tab-content2" class="tab-content js-tab-content" style="display: block;">

тут явно косячит твой скрипт табов

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...