Small lines: i no post the file sbecause if you have made some modifications it is easy to insert these lines
1) in your catalog/language/product/product.php insert
Code: Select all
$_['text_email'] = 'An user (email: %s) has write a review for a productt (%s); your email is set as sending';
$_['subject_text_email'] = "Review insert";
2) at line 351 ofcatalog/controller/product.php insert this code
Code: Select all
//aggiunta per invio email
$mail = new Mail();
$mail->setFrom($this->request->post['email']);
$mail->setTo($this->config->get('config_email'));
$mail->setSender($this->config->get('config_store'));
$mail->setSubject($this->language->get('subject_text_email'));
$mail->setText(sprintf($this->language->get('text_email'), $this->request->post['email'],HTTP_SERVER."index.php?route=product/product&product_id=".$this->request->get['product_id']));
$mail->send();
//fine aggiunta
Code: Select all
<!--START-->
<b><?php echo $entry_email; ?></b><br />
<input type="text" name="email" value="" />
<br />
<!--END-->
Code: Select all
<div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;"><b><?php echo $entry_name; ?></b><br />
<input type="text" name="name" value="" />
<br />
in
Code: Select all
function review() {
$.ajax({
type: 'post',
url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>',
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())+ '&email=' + ($('input[name=\'email\']').val()),
beforeSend: function() {
$('.success, .warning').remove();
$('#review_button').attr('disabled', 'disabled');
$('#review_title').after('<div class="wait"><img src="catalog/view/theme/default/image/loading_1.gif" alt="" /> <?php echo $text_wait; ?></div>');
},
complete: function() {
$('#review_button').attr('disabled', '');
$('.wait').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('');
$('input[name=\'email\']').val('');
$('textarea[name=\'text\']').val('');
$('input[name=\'rating\']:checked').attr('checked', '');
$('input[name=\'captcha\']').val('');
}
}
});
}