Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Please help - how do you remove reviews?


Teddy K

Recommended Posts

Hi, I wonder if anyone can help me with this problem.  I am new to osCommerce.  I just installed version 2.3.4 and I want to remove the review products button.  I went to the Administration Tool > Modules > Boxes and removed the Review module.  However the front end of my store still shows the Review button with the product description page and if I click the link, I can write a review.  Maybe I am missing the obvious, but is there something I have neglected to do?  I have refreshed by browser cache.  I tried commenting out certain lines of code as suggested by others, but that just breaks my store - I think that may be a fix for earlier versions.  Can anyone help me?  Thanks.

Link to comment
Share on other sites

look inside the product_info.php file. Meaning you will need to edit the php file itself to get rid of the button.

If you just want to remove the reviews button remove line 217 and while you're at it remove also the code between line 209 - 212 if you don't intend to use the reviews function ever.

Link to comment
Share on other sites

This is how I would remove reviews. In catalog/product_info.php

FIND:

<?php
    $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and reviews_status = 1");
    $reviews = tep_db_fetch_array($reviews_query);
?>

REPLACE WITH:

<?php
//    $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and reviews_status = 1");
//    $reviews = tep_db_fetch_array($reviews_query);
?>

FIND:

    <?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'comment', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?>

REPLACE WITH:

    <?php //echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'comment', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?>

Then delete the following files:

catalog/product_reviews.php
catalog/product_reviews_info.php
catalog/product_reviews_write.php

Link to comment
Share on other sites

Wow, thanks for the lightning quick responses.  I had already tried the first fix and that worked.  Quick and easy! Thanks!  But I can see that the second fix would probably work as well and I will try that in a 2nd installation that I have and see if that fixes it.  I wonder why removing the Reviews module did not work in either store.  Anyway, thanks so much.

Link to comment
Share on other sites

Leaving the code in the file but commenting it out using // is the best way of disabling the buttons. Should you ever decide that you need the buttons at a later date all you have to do is to remove the // and it will work again, rather than have to try and find the code that you removed.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...