Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a message after a review is posted to inform user moderation is n…

…eeded. Fixes issue #123
  • Loading branch information...
commit 14c6cbbf27a4be72d4efc3b2c368876087ef0fe4 1 parent e645c13
@markkevans markkevans authored haraldpdl committed
View
2  catalog/includes/languages/english/product_reviews_write.php
@@ -20,5 +20,7 @@
define('TEXT_BAD', '<small><font color="#ff0000"><strong>BAD</strong></font></small>');
define('TEXT_GOOD', '<small><font color="#ff0000"><strong>GOOD</strong></font></small>');
+define('TEXT_REVIEW_RECEIVED', 'Thank you for your review. It has been submitted to the store owner for approval and should appear shortly.');
+
define('TEXT_CLICK_TO_ENLARGE', 'Click to enlarge');
?>
View
6 catalog/product_reviews.php
@@ -42,6 +42,12 @@
require(DIR_WS_INCLUDES . 'template_top.php');
?>
+<?php
+ if ($messageStack->size('product_reviews') > 0) {
+ echo $messageStack->output('product_reviews');
+ }
+?>
+
<div>
<h1 style="float: right;"><?php echo $products_price; ?></h1>
<h1><?php echo $products_name; ?></h1>
View
5 catalog/product_reviews_write.php
@@ -12,6 +12,8 @@
require('includes/application_top.php');
+ require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_REVIEWS_WRITE);
+
if (!tep_session_is_registered('customer_id')) {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
@@ -50,6 +52,7 @@
tep_db_query("insert into " . TABLE_REVIEWS_DESCRIPTION . " (reviews_id, languages_id, reviews_text) values ('" . (int)$insert_id . "', '" . (int)$languages_id . "', '" . tep_db_input($review) . "')");
+ $messageStack->add_session('product_reviews', TEXT_REVIEW_RECEIVED, 'success');
tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('action'))));
}
}
@@ -66,8 +69,6 @@
$products_name = $product_info['products_name'];
}
- require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_REVIEWS_WRITE);
-
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()));
require(DIR_WS_INCLUDES . 'template_top.php');
Please sign in to comment.
Something went wrong with that request. Please try again.