[-] MO : BugFix : #PSCFV-2822 : ProductComment module : submitNewMessage url problem

This commit is contained in:
vChabot
2012-06-25 09:52:35 +00:00
parent 89d8e3a96b
commit 94af03689c
3 changed files with 5 additions and 2 deletions
@@ -54,8 +54,9 @@ $(function() {
e.preventDefault();
// Form element
url_options = productcomments_url_rewrite ? '?' : '&';
$.ajax({
url: productcomments_controller_url+'&action=add_comment&secure_key='+secure_key,
url: productcomments_controller_url+url_options+'action=add_comment&secure_key='+secure_key,
data: $('#fancybox-content form').serialize(),
type: 'POST',
dataType: "json",
+2 -1
View File
@@ -755,7 +755,8 @@ class ProductComments extends Module
'productcomment_cover' => (int)Tools::getValue('id_product').'-'.(int)$image['id_image'],
'mediumSize' => Image::getSize('medium'),
'nbComments' => (int)ProductComment::getCommentNumber((int)Tools::getValue('id_product')),
'productcomments_controller_url' => $this->context->link->getModuleLink('productcomments')
'productcomments_controller_url' => $this->context->link->getModuleLink('productcomments'),
'productcomments_url_rewriting_activated' => Configuration::get('PS_REWRITING_SETTINGS', 0)
));
$this->context->controller->pagination((int)ProductComment::getCommentNumber((int)Tools::getValue('id_product')));
@@ -27,6 +27,7 @@
var productcomments_controller_url = '{$productcomments_controller_url}';
var confirm_report_message = "{l s='Are you sure you want report this comment?' mod='productcomments'}";
var secure_key = "{$secure_key}";
var productcomments_url_rewrite = '{$productcomments_url_rewriting_activated}';
</script>
<div id="idTab5">