Rezolles_Net Posted July 12, 2006 Share Posted July 12, 2006 Hello, I've a suggestion.At the moment,customer didn't know that their review need to be approve first.Some of them might think that something was wrong,their review did not show up after their submit it.So,can anyone make a notification for this? Thanks Quote Link to comment Share on other sites More sharing options...
Rezolles_Net Posted July 12, 2006 Author Share Posted July 12, 2006 B U M P Anyone? Quote Link to comment Share on other sites More sharing options...
insomniac2 Posted July 12, 2006 Share Posted July 12, 2006 I`m pretty sure that when a person fills out and submits a review that a message box is displayed telling them that their review has been successfully submitted and will be displayed after being approved. At least thats a message that I get .. but I think it is standard with oscommerce installation. I did change the wording though. If not than you can add a success message by using the meessagestack ADD: $messageStack->add_session('review', SUCCESS_REVIEW_SENT, 'success'); BEFORE the tep_redirect statement in your product_reviews_write.php file (note mine may be different or modded) tep_redirect(tep_href_link(FILENAME_REVIEW_NOTICE, tep_get_all_get_params(array('action')))); So looks something like: $messageStack->add_session('reviews', SUCCESS_REVIEW_SENT, 'success'); tep_redirect(tep_href_link(FILENAME_REVIEW_NOTICE, tep_get_all_get_params(array('action')))); ADD the message to catalog/includes/languages/english/product_reviews_write.php define(SUCCESS_REVIEW_SENT, 'Thank you for your product review. It has been submitted to the Site Administrator for content approval. After approval it will be displayed in the product reviews listing.'); Quote Link to comment Share on other sites More sharing options...
insomniac2 Posted July 12, 2006 Share Posted July 12, 2006 (edited) Ignore that last post. I`m sorry I do have a review mod installed. You could install the Better Reviews System mod which actually redirects the person to a review notice page .. or if you just want a success message try the following. You can add a success message by using the meessagestack ADD: $messageStack->add_session('review', SUCCESS_REVIEW_SENT, 'success'); BEFORE the tep_redirect statement in your product_reviews_write.php file tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('action')))); So looks something like: if ($error == false) { tep_db_query("insert into " . TABLE_REVIEWS . " (products_id, customers_id, customers_name, reviews_rating, date_added) values ('" . (int)$HTTP_GET_VARS['products_id'] . "', '" . (int)$customer_id . "', '" . tep_db_input($customer['customers_firstname']) . ' ' . tep_db_input($customer['customers_lastname']) . "', '" . tep_db_input($rating) . "', now())"); $insert_id = tep_db_insert_id(); 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('reviews', SUCCESS_REVIEW_SENT, 'success'); tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('action')))); } } ADD the message to catalog/includes/languages/english/product_reviews_write.php define(SUCCESS_REVIEW_SENT, 'Thank you for your product review. It has been submitted to the Site Administrator for content approval. After approval it will be displayed in the product reviews listing.'); Edited July 12, 2006 by insomniac2 Quote Link to comment Share on other sites More sharing options...
Rezolles_Net Posted July 13, 2006 Author Share Posted July 13, 2006 Ignore that last post. I`m sorry I do have a review mod installed. You could install the Better Reviews System mod which actually redirects the person to a review notice page .. or if you just want a success message try the following. You can add a success message by using the meessagestack ADD: $messageStack->add_session('review', SUCCESS_REVIEW_SENT, 'success'); BEFORE the tep_redirect statement in your product_reviews_write.php file tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('action')))); So looks something like: if ($error == false) { tep_db_query("insert into " . TABLE_REVIEWS . " (products_id, customers_id, customers_name, reviews_rating, date_added) values ('" . (int)$HTTP_GET_VARS['products_id'] . "', '" . (int)$customer_id . "', '" . tep_db_input($customer['customers_firstname']) . ' ' . tep_db_input($customer['customers_lastname']) . "', '" . tep_db_input($rating) . "', now())"); $insert_id = tep_db_insert_id(); 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('reviews', SUCCESS_REVIEW_SENT, 'success'); tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('action')))); } } ADD the message to catalog/includes/languages/english/product_reviews_write.php define(SUCCESS_REVIEW_SENT, 'Thank you for your product review. It has been submitted to the Site Administrator for content approval. After approval it will be displayed in the product reviews listing.'); Which one is correct? :'( <_< >_< Quote Link to comment Share on other sites More sharing options...
Guest Posted July 13, 2006 Share Posted July 13, 2006 (edited) Hi there a notification does work to tell customer, but theres a mistake or ommision in the installation instructions. In catalog/product_reviews_write.php you are asked to find and replace: Around line 22 Change this: tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('action')))); to this: tep_redirect(tep_href_link(FILENAME_REVIEW_NOTICE, tep_get_all_get_params(array('action')))); On my installation this command exists twice within catalog/product_reviews_write.php, second line around Line 51. Also a further enhancement to this contrib is the ability to use it like product/categories, where you have the green approval and red reject icons side by side and are clickable. To apply, Find in Admin/Reviews Line 236 (Approx) <td class="dataTableContent" align="center"><?php echo $reviews['approved']==1?tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10):tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); ?></td> CHANGE TO: <td class="dataTableContent" align="center"><?php echo $reviews['approved']==1? '<a href="' . tep_href_link(FILENAME_REVIEWS, tep_get_all_get_params(array('action', 'info')) . 'action=disapprove_review&rID=' . $reviews['reviews_id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . '</a>?<a href="' . tep_href_link(FILENAME_REVIEWS, tep_get_all_get_params(array('action', 'info')) . 'action=disapprove_review&rID=' . $reviews['reviews_id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED, 10, 10) . '</a>':'<a href="' . tep_href_link(FILENAME_REVIEWS, tep_get_all_get_params(array('action', 'info')) . 'action=approve_review&rID=' . $reviews['reviews_id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . '</a>?<a href="' . tep_href_link(FILENAME_REVIEWS, tep_get_all_get_params(array('action', 'info')) . 'action=approve_review&rID=' . $reviews['reviews_id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10) . '</a>' ?></td> Edited July 13, 2006 by stu2000 Quote Link to comment Share on other sites More sharing options...
Rezolles_Net Posted July 13, 2006 Author Share Posted July 13, 2006 It's working.....thanks. Quote Link to comment Share on other sites More sharing options...
azer Posted November 19, 2006 Share Posted November 19, 2006 i got a strange problem, the customer leave a review with quote in it because of the french language word like : andrew's father then i see in the admin the correct text but when i approve it , hte review is rewritten with escape slash on it : andrew's father BECOMES andrew\'s father any ideas ? Quote MS2 Link to comment Share on other sites More sharing options...
HelleM Posted December 30, 2006 Share Posted December 30, 2006 I have two languages - if a review is written and approved in one language, the counter for reviews on the product_info.php page shows fine, but unfortunately also on the "other" language, which must be a mistake.... How can I solve this? Helle :-) Quote Link to comment Share on other sites More sharing options...
Guest Posted April 30, 2007 Share Posted April 30, 2007 I have this review approve contribution installed along with related products and CCGV (trad) after i approve a review the same review shows up in any product clicked on to review. I uninstalled it and the review system works normally. Any ideas what is wrong? Thanks, George Quote Link to comment Share on other sites More sharing options...
ToyStore Posted September 1, 2007 Share Posted September 1, 2007 Question: My reviews are not posting to the admin section, what should I check first? Quote Link to comment Share on other sites More sharing options...
aerosmith Posted March 13, 2008 Share Posted March 13, 2008 Can someone help me with this mod, for security reasons, i would need that the reviews only show the first name. when i look at the code i see customer_name. which it shooting out both names im basically lost with the code, Anyone able to assist? Quote Link to comment Share on other sites More sharing options...
pwgrand Posted April 17, 2008 Share Posted April 17, 2008 Dont know if its usefull , but here the little change you have to do that it works with the contrib Reviews in Product display v.2.3 together. Find the code below from this contrib in product_info.php. ( Should be somewhere on the begin, can't remember now exactly because i changed it a bit for myself and deleted a few parts) The code down has only a little change "r.approved='1'" If have not the original file on my pc and at the mometn not the time to search or download it. NEW CODE: <?php if (MAX_REVIEWS_IN_PRODUCT_INFO > 0) { $reviews_query = tep_db_query("select r.reviews_id, rd.reviews_text, r.reviews_rating, r.date_added, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and rd.reviews_id = r.reviews_id and rd.languages_id = '" . $languages_id . "' and r.approved = '1' order by r.reviews_id DESC"); $num_rows = tep_db_num_rows($reviews_query); ?> I have the contrib allow guest reviews installed. Each time when a guest wrote a review you could see it without approval on the p info page. Also was installed review approval system. This code now works together with the the 2 other review contribs. Thanks for the great contrib you made. i like the layout very much. bye bye Quote Link to comment Share on other sites More sharing options...
pwgrand Posted April 17, 2008 Share Posted April 17, 2008 Can someone help me with this mod, for security reasons, i would need that the reviews only show the first name. when i look at the code i see customer_name. which it shooting out both names im basically lost with the code,Anyone able to assist? Hi, there is a contrib you can look for discreed reviews etc. is easy to modify.if not you can write me or in the forum. but try at first the contrib. hope could help a bit Quote Link to comment Share on other sites More sharing options...
Andreas2003 Posted January 21, 2009 Share Posted January 21, 2009 Hi there, I have a problem with this contrib. I have installed the new version 1.3_1 and it works fine, but have one mistake. If a customer is not logged in into his account, 1.) customer is on product detail page and clicks on the button "reviews" 2.) customer is now coming to file "product_reviews.php", where the reviews are shown. 3.) when customer clicks on the button to write his own statement/review, he will reach the file "product_reviews_write.php" AND is immediately redirected to the login-page 4.) But after he logged in into his account, he will get to file "review_notice.php", telling the customer directly, that the review is submitted INSTEAD of leading him to file "product_reviews_write.php" in order to write his review. Can anyone tell me please, what might be wrong in my installation ?? Thanks in advance, kind regards Andreas Quote Link to comment Share on other sites More sharing options...
Andreas2003 Posted January 29, 2009 Share Posted January 29, 2009 BUMP The problem seems to be in the product_reviews_write.php. I placed the following in the login.php to see the output of the redirect_variable echo "Redirect to : " . $navigation->snapshot['page']; The output is correct (coming from the product_reviews_write.php) by redirecting to product_reviews_write.php BUT still there is no possibility to write a comment, because the user is (again) redirected to the review_notice.php. My code in the product_reviews_write.php for the tep_redirect's is: if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } $product_info_query = tep_db_query("select p.products_id, p.products_model, p.products_image, p.products_price, p.products_tax_class_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); if (!tep_db_num_rows($product_info_query)) { // BOF Review Approval System tep_redirect(tep_href_link(FILENAME_REVIEW_NOTICE, tep_get_all_get_params(array('action')))); // EOF Review Approval System } else { $product_info = tep_db_fetch_array($product_info_query); } and the second place in the code: tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $subject, $message, $from_name, STORE_OWNER_EMAIL_ADDRESS); //end notify store owner tep_redirect(tep_href_link(FILENAME_REVIEW_NOTICE, tep_get_all_get_params(array('action')))); } } In the original file from the osC RC1 repository, both places in the code have this here: tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS but this variant is also not working. Any more ideas ? Thanks in advance, Andreas Quote Link to comment Share on other sites More sharing options...
Andreas2003 Posted February 2, 2009 Share Posted February 2, 2009 Anyone have this contrib working correctly and is able to have a quick look in the code for me please ?? Thank you very much in advance Quote Link to comment Share on other sites More sharing options...
vallenssia Posted February 26, 2009 Share Posted February 26, 2009 This contribution works fine, except my reviews are showing on the product_info before I ever approved them. Does anyone have any idea where I should look for the mistake? Thanks. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 21, 2009 Share Posted April 21, 2009 Everything with this contribution is working well for me except once a customer adds a review, they are directed back to the product info page, instead of the review notice page. I've checked the product_reviews_write.php page and it all seems to be in there correctly, but obviously it's not because it's not working. Any ideas? Quote Link to comment Share on other sites More sharing options...
gomino Posted November 29, 2009 Share Posted November 29, 2009 This contribution works fine, except my reviews are showing on the product_info before I ever approved them. Does anyone have any idea where I should look for the mistake? Thanks. It looks like your reviews are "pre-approved". Try changing from 1 to 0 the default setting in the 'approved' column of your reviews table in your database Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.