Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2010
    Posts
    63
    Plugin Contributions
    0

    Default Product Reviews of different languages grouped together in the same page

    How can I group the reviews even if they are from different languages?
    I have 4 reviews in Portugal Portuguese and 1 in Brasil Portuguese and I would like to show the 5 reviews together!
    I edited both header_php.php from includes/modules/reviews/pages/product_reviews and product_reviews_info

    and removed the lines:

    Code:
    AND pd.language_id = :languagesID
    and

    Code:
      $review_query_raw = $db->bindVars($review_query_raw, ':languagesID', $_SESSION['languages_id'], 'integer');
    but it still doesn't group together.

    Any idea?
    Thanks!

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    3,522
    Plugin Contributions
    33

    Default Re: Product Reviews of different languages grouped together in the same page

    I think you are changing the SQL query associated with the product information, not the reviews' information. You probably want the product description and name to appear in the language that the current customer has chosen. To display the multiple language reviews, try changing this section (/includes/modules/pages/product_reviews/header_php.php):

    Code:
      $review_status = " and r.status = 1";
    
      $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 = :productsID
                            AND r.reviews_id = rd.reviews_id
                            AND rd.languages_id = :languagesID " . $review_status . "
                            ORDER BY r.reviews_id desc";
    
      $reviews_query_raw = $db->bindVars($reviews_query_raw, ':productsID', $_GET['products_id'], 'integer');
      $reviews_query_raw = $db->bindVars($reviews_query_raw, ':languagesID', $_SESSION['languages_id'], 'integer');
      $reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS);
      $reviews = $db->Execute($reviews_split->sql_query);
    to this:

    Code:
      $review_status = " and r.status = 1";
    
      $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 = :productsID
                            AND r.reviews_id = rd.reviews_id " . $review_status . "
                            ORDER BY rd.languages_id, r.reviews_id desc";
    
      $reviews_query_raw = $db->bindVars($reviews_query_raw, ':productsID', $_GET['products_id'], 'integer');
    /*  $reviews_query_raw = $db->bindVars($reviews_query_raw, ':languagesID', $_SESSION['languages_id'], 'integer'); */
      $reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS);
      $reviews = $db->Execute($reviews_split->sql_query);

 

 

Similar Threads

  1. Reviews for two languages
    By CaroleAs in forum Basic Configuration
    Replies: 4
    Last Post: 19 Aug 2009, 05:04 AM
  2. Replies: 0
    Last Post: 13 May 2009, 07:02 PM
  3. Product page - how to show a link to the reviews page and reviews count?
    By Ronson in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 26 Mar 2009, 11:45 PM
  4. Reviews in both languages
    By lapinx in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 6 Oct 2008, 09:49 AM
  5. 1 product & 2 languages = twice new products page ?
    By hlantern in forum General Questions
    Replies: 1
    Last Post: 11 Jun 2008, 06:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •