Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Reviews page shows "[C of 5 Stars!]"


verbalkent

Recommended Posts

This just started happening, I havent installed any new contribs lately, heres the link that shows the error "http://www.hunidproof.com/product_reviews_info.php/products_id/154/reviews_id/2" and heres whats in the files that Ive found that call for the reviews star information..

 

 

includes/languages/english/product_reviews_info.hp

define('TEXT_OF_5_STARS', '%s of 5 Stars!');

Link to comment
Share on other sites

This just started happening, I havent installed any new contribs lately, heres the link that shows the error "http://www.hunidproof.com/product_reviews_info.php/products_id/154/reviews_id/2" and heres whats in the files that Ive found that call for the reviews star information..

includes/languages/english/product_reviews_info.hp

define('TEXT_OF_5_STARS', '%s of 5 Stars!');

 

 

Sorry, clicked enter too fast, heres the rest if it helps..

 

/product_reviews_info.php

 

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td valign="top" class="main"><?php echo tep_break_string(nl2br(tep_output_string_protected($review['reviews_text'])), 60, '-<br>') . '<br><br><i>' . sprintf(TEXT_REVIEW_RATING, tep_image(DIR_WS_IMAGES . 'stars_' . $review['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $review['reviews_rating'])), sprintf(TEXT_OF_5_STARS, $review['reviews_rating'])) . '</i>'; ?></td>

<td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

 

 

 

includes/languages/english/product_reviews_info.php

 

define('TEXT_OF_5_STARS', '%s of 5 Stars');

 

includes/languages/english/product_reviews.php

 

define('TEXT_OF_5_STARS', '%s of 5 Stars!');

 

includes/languages/english.php

 

define('BOX_REVIEWS_TEXT_OF_5_STARS', '%s of 5 Stars!');

 

********************************************************

<?php

$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");

$reviews = tep_db_fetch_array($reviews_query);

if ($reviews['count'] > 0) {

?>

 

 

<tr>

<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>

</tr>

 

<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>

 

TOO many occurances to post without it looking like spam...

 

 

any help is appreciated..

 

tia

Link to comment
Share on other sites

  • 1 month later...
Sorry, clicked enter too fast, heres the rest if it helps..

 

/product_reviews_info.php

 

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td valign="top" class="main"><?php echo tep_break_string(nl2br(

\

...........

...........

 

TOO many occurances to post without it looking like spam...

any help is appreciated..

 

tia

Go look at this thread:

 

http://www.oscommerce.com/forums/index.php?showtopic=68653&hl=

 

It deals with a similar situation or one like yours based on your description. Try it out.

 

In short, it says (in product_reviews_info.php) replace all 30 occurances of

 

$review

 

with

 

$myreview

 

($myreview can be something else, just as long it doesn't match some other string).

 

It worked for me :thumbsup:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...