diff --git a/catalog/includes/languages/english/product_reviews_write.php b/catalog/includes/languages/english/product_reviews_write.php index 5c4c92195..231d4b570 100644 --- a/catalog/includes/languages/english/product_reviews_write.php +++ b/catalog/includes/languages/english/product_reviews_write.php @@ -20,5 +20,7 @@ define('TEXT_BAD', 'BAD'); define('TEXT_GOOD', 'GOOD'); +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'); ?> diff --git a/catalog/product_reviews.php b/catalog/product_reviews.php index 377ae59d4..4426f1993 100644 --- a/catalog/product_reviews.php +++ b/catalog/product_reviews.php @@ -42,6 +42,12 @@ require(DIR_WS_INCLUDES . 'template_top.php'); ?> +size('product_reviews') > 0) { + echo $messageStack->output('product_reviews'); + } +?> +

diff --git a/catalog/product_reviews_write.php b/catalog/product_reviews_write.php index 3e486b815..6b0729876 100644 --- a/catalog/product_reviews_write.php +++ b/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');