White_S
Постоялец
- Регистрация
 - 27 Май 2009
 
- Сообщения
 - 482
 
- Реакции
 - 102
 
/index.php?route=product/product&path=59&product_id=68а как у тебя route в урле выглядит, когда открыт продукт с специфическим шаблоном категории?
Где 59 - это и есть айди категории. Я так понял надо править где-то тут
		Код:
	
	<script type="text/javascript"><!--
$('#review .pagination a').live('click', function() {
    $('#review').fadeOut('slow');
       
    $('#review').load(this.href);
   
    $('#review').fadeIn('slow');
   
    return false;
});           
 
$('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>');
 
$('#button-review').bind('click', function() {
    $.ajax({
        url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>',
        type: 'post',
        dataType: 'json',
        data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()),
        beforeSend: function() {
            $('.success, .warning').remove();
            $('#button-review').attr('disabled', true);
            $('#review-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>');
        },
        complete: function() {
            $('#button-review').attr('disabled', false);
            $('.attention').remove();
        },
        success: function(data) {
            if (data['error']) {
                $('#review-title').after('<div class="warning">' + data['error'] + '</div>');
            }
           
            if (data['success']) {
                $('#review-title').after('<div class="success">' + data['success'] + '</div>');
                               
                $('input[name=\'name\']').val('');
                $('textarea[name=\'text\']').val('');
                $('input[name=\'rating\']:checked').attr('checked', '');
                $('input[name=\'captcha\']').val('');
            }
        }
    });
});
//--></script>
	
				