Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

REVIEWS and languages : I guess it's easy to solve but how?


Guest

Recommended Posts

While testing my store, I noticed the following :

 

a) ENGLISH STORE : no problem in editing or viewing products reviews

B) ITALIAN STORE : no problem in editing or viewing products reviews

 

PROBLEM

 

It happens that when I am reading a review in the English store and, staying on the same page, I change to the Italian language to read the review, I am not able to read the review (page allerts me that THERE ARE CURRENTLY NO PRODUCTS REVIEWS.).

The same happens viceversa, when on the Italian store I change to the English one.

 

Again, in the products page, I can see that the CURRENT REVIEWS indicates 2, but if they are not in the language that I've choosed when accessing the online store, I'll not be able to read them untill I change all the languages.

 

SOLUTION?

 

I guess that the correct thing to do is that the reviews should be seen even if they are in a different language.

 

Who can help me with this?

 

Grazie

Link to comment
Share on other sites

I'm not sure I'm understanding your complaint. It seems to me that you're complaining reviews written in Italian (or written when the reviewer was viewing the page in Italian) are not displayed on the English pages, and vice versa.

 

If so:

 

In reviews.php, find this line around line 50 or so:

 

  $reviews_query_raw = "select r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_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 p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and rd.languages_id = '" . (int)$languages_id . "' order by r.reviews_id DESC";

 

And change to

 

  $reviews_query_raw = "select r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_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 p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by r.reviews_id DESC";

 

Please note that this is not tested, but I believe it should work.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

Ciao, thank you for reply and sorry for my poor English.

 

Yes, you understood my problem : it seems funny to look in the product's page at the description of a product that you are willing to buy, and you have "helpful" reviews that you will be able to read only if they have been previously written from the reviewer in the same language page of yours.

 

I've tried to change code as you indicated me but it seems not to work. I know you are near the solution. Any other suggestion?

 

Grazie

Link to comment
Share on other sites

OK, found out where to change the code.

 

Open CATALOG/PRODUCTS_REVIEWS.PHP and, at line 93 or so, find the following code:

 

  $reviews_query_raw = "select r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$product_info['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' order by r.reviews_id desc";

 

and change with this one :

 

$reviews_query_raw = "select r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$product_info['products_id'] . "' and r.reviews_id = rd.reviews_id order by r.reviews_id desc";

 

It should do, don't know yet if the change effects other parts of the shop. Let you know.

 

A special thank you to kgt and Ernieboy.

Ciao

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...