Guest Posted November 18, 2006 Posted November 18, 2006 Hi there, As many people here, I am new and I am in need of help to configure this great piece of software. How can I stop customer, to write a review? I do not want this feature at the moment... I went into Admin>Configuration>My Store, I then set "allow recommendation to 'False', but still user are able to add and view review. The knowledge database says the following "Figure 1 shows the Services listing page under the Admin>Configuration>Services section." I do not have a service section in configuration, is there something I am missing or is it from an older/newer version? I thought I was using the latest release: osCommerce 2.2-MS2 I would be grateful for any help and advice on how to stop user have the ability to stop leaving comment. Emmanuel
wppnewb Posted November 18, 2006 Posted November 18, 2006 Hi there, As many people here, I am new and I am in need of help to configure this great piece of software. How can I stop customer, to write a review? I do not want this feature at the moment... I went into Admin>Configuration>My Store, I then set "allow recommendation to 'False', but still user are able to add and view review. The knowledge database says the following "Figure 1 shows the Services listing page under the Admin>Configuration>Services section." I do not have a service section in configuration, is there something I am missing or is it from an older/newer version? I thought I was using the latest release: osCommerce 2.2-MS2 I would be grateful for any help and advice on how to stop user have the ability to stop leaving comment. Emmanuel Why dont you simply remove the "Write Review" button from the code in the appropriate file? Amit
CaptainBlue Posted November 21, 2006 Posted November 21, 2006 How can I stop customer, to write a review? I do not want this feature at the moment... Neither do I. I agree also about the documentation being wrong about this feature. Why dont you simply remove the "Write Review" button from the code in the appropriate file? That's missing the point, and besides the reviews part crops up all over the place if you look at product listings. We don't want a review system at all and would like to disable it completely.
rockalot Posted November 25, 2006 Posted November 25, 2006 I am having the same issue. I want to remove the "Review" box from the entire store but do not have the "Services" link at "Admin>Configuration>Services". I to am running the latest release: osCommerce 2.2-MS2
Guest Posted November 26, 2006 Posted November 26, 2006 Hi there rockalot, CapainBlue and any other interested! :P As I have found a work around to enable and disable review for the whole shop and it seems some of you might be interested I am going to try to tell you how I have done it. First of all, I have found the answer in the French forum of OsCommerce. Thank you so much to Gnidhal you provided it. The original thread is here for those of you who can read French! B) Here is a link to do all the following automatically with a package, as I haven't used it or tested it, I will add it if you want to give it a try. The French post advice to use the package instead of what I have done, so I will encourage you to do so as the thread say it works and it might save you time work and confusion. Other than that, this is what I have personaly done. ################################################################## Steps to activate or deactivate the review option in your shop. Number of modifications needed: 3 1. Add a new entry in the SQL database 2. Modify review.php 3. Modify product_info.php ################################################################## #1- In the SQL database, insert the following entry using PHPmyAdmin: insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Use product review', 'USE_PRODUCTS_REVIEW', 'False', 'Show the review option to user and allow customer to add teir own review on products.', '1', '22', NULL, '2006-11-26 13:29:52', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),'); #2- In catalog/includes/boxes/reviews.php replace the code (delete everything and paste) with the following: <?php /* $Id: reviews.php,v 1.37 2003/06/09 22:20:28 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ $products_in_reviews = true; $random_select = "select r.reviews_id, r.reviews_rating, p.products_id, p.products_image, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"; if (isset($HTTP_GET_VARS['products_id'])) { $random_select .= " and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"; } $random_select .= " order by r.reviews_id desc limit " . MAX_RANDOM_SELECT_REVIEWS; $random_product = tep_random_select($random_select); $info_box_contents = array(); if ($random_product) { // display random review box $rand_review_query = tep_db_query("select substring(reviews_text, 1, 60) as reviews_text from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int)$random_product['reviews_id'] . "' and languages_id = '" . (int)$languages_id . "'"); $rand_review = tep_db_fetch_array($rand_review_query); $rand_review_text = tep_break_string(tep_output_string_protected($rand_review['reviews_text']), 15, '-<br>'); $info_box_contents[] = array('text' => '<div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . $rand_review_text . ' ..</a><br><div align="center">' . tep_image(DIR_WS_IMAGES . 'stars_' . $random_product['reviews_rating'] . '.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_product['reviews_rating'])) . '</div>'); } elseif (isset($HTTP_GET_VARS['products_id'])) { // display 'write a review' box $info_box_contents[] = array('text' => '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'box_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a></td><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . BOX_REVIEWS_WRITE_REVIEW .'</a></td></tr></table>'); } else { // display 'no reviews' box // $info_box_contents[] = array('text' => BOX_REVIEWS_NO_REVIEWS); $products_in_reviews = false; } if ($products_in_reviews == true && USE_PRODUCTS_REVIEW != 'false') { ?> <!-- reviews //--> <tr> <td> <?php $info_box_contents_head = array(); $info_box_contents_head[] = array('text' => BOX_HEADING_REVIEWS); new infoBoxHeading($info_box_contents_head, true, true, tep_href_link(FILENAME_REVIEWS)); new infoBox($info_box_contents); ?> </td> </tr> <!-- reviews_eof //--> <?php } ?> #3- In catalog/product_info.php look for: <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td> and replace it with: <td class="main"><?php echo (USE_PRODUCTS_REVIEW != 'false')?'<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>':''; ?></td> ################################################################## You need to do all the above modification or it will not work. I am not the author of this workaround, but it did work for me, I hope it will do what you wanted. Good luck and let me know if that helps, GwU777
BigMark Posted November 26, 2006 Posted November 26, 2006 Hi, All this un-necessary! Just go to catalog/includes/column_right.php Then find the entry: require(DIR_WS_BOXES . 'reviews.php'); Change to /* require(DIR_WS_BOXES . 'reviews.php'); */ Simple as that, and when you're ready to use this feature, just remove the tags! Regards, Mark
Guest Posted November 26, 2006 Posted November 26, 2006 Hi,All this un-necessary! Just go to catalog/includes/column_right.php Then find the entry: require(DIR_WS_BOXES . 'reviews.php'); Change to /* require(DIR_WS_BOXES . 'reviews.php'); */ Simple as that, and when you're ready to use this feature, just remove the tags! Regards, Mark I guess this is a point, but it will remove it only from the right column. It will still be accessible from the product itself. Users would be able to write and read review from there and actually other various places on the shop. For me, (and others I guess) this is not enough and the above option allow me to enable them or not from the control panel. As I have written, i have explained what I have done, but the package should do the same very easely and with less confusion, I tried to be exhaustive to describe my experience! Cheers, GwU777
rockalot Posted November 26, 2006 Posted November 26, 2006 Hi,All this un-necessary! Just go to catalog/includes/column_right.php Then find the entry: require(DIR_WS_BOXES . 'reviews.php'); Change to /* require(DIR_WS_BOXES . 'reviews.php'); */ Simple as that, and when you're ready to use this feature, just remove the tags! Regards, Mark Thanks BigMark! I was looking for that file to alter on my hard drive but I guess it failed to DL so I thought there was no such thing. All is good now :thumbsup: Rockalot
Guest Posted November 26, 2006 Posted November 26, 2006 Was trying to help.... Missed your point And you did help, thank you! :lol:
Guest Posted November 26, 2006 Posted November 26, 2006 I have reread my post and just in case, this is not clear: The above solution will add an entry in the configuration>my shop part of the admin so that you can enable or disable the review feature to your liking. Just wanted to clarify. As BigMark reminded me, changing big part of coding might be potentialy dangerous, I recommend to backup the file you change before changing them so that you can easely go back to a previous state. It worked perfectly for me and others, but better be safe than sorry! Cheers, GwU777
rockalot Posted November 26, 2006 Posted November 26, 2006 I have reread my post and just in case, this is not clear:The above solution will add an entry in the configuration>my shop part of the admin so that you can enable or disable the review feature to your liking. Just wanted to clarify. As BigMark reminded me, changing big part of coding might be potentialy dangerous, I recommend to backup the file you change before changing them so that you can easely go back to a previous state. It worked perfectly for me and others, but better be safe than sorry! Cheers, GwU777 Excellent, I'll have to give this a shot as well. I didn't gather from your first post that it installed an additional entry. Thanks for the clarification. Rockalot
Guest Posted November 26, 2006 Posted November 26, 2006 Excellent, I'll have to give this a shot as well. I didn't gather from your first post that it installed an additional entry. Thanks for the clarification. Rockalot Sorry I wasn't clear. You just have an extra option to which you can decide whether you want review on the whole store or not. I find it very handy and I think it should be part of the initial release, rather than to have to look for it so much. I would have thought that not everyone want reviews! I hope it works for you too, for me it did wonders! I don't seem to be able to edit the previous post anymore, it is a shame - anyone knows why? GwU777
Recommended Posts
Archived
This topic is now archived and is closed to further replies.