Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2010
    Location
    Italy
    Posts
    64
    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
    12,401
    Plugin Contributions
    87

    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. Replies: 6
    Last Post: 2 Dec 2011, 03:06 PM
  2. Replies: 2
    Last Post: 27 Oct 2010, 01:45 PM
  3. Can similar subcategories of different Categories be grouped and displayed together?
    By Mac in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 8 Mar 2010, 05:48 AM
  4. 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
  5. Shipping different specially grouped products from different manufacturers
    By Deansta in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 21 Apr 2008, 03:06 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR