Thread: Reviews

Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    3,663
    Plugin Contributions
    55

    Default Reviews

    PHP: 7.3.8
    Zen Cart: 1.5.6b

    I am trying to find the query which will add reviews on other pages. The old 1.5.5 query does not work. I searched and searched and haven't been able to locate the correct query to pull. Any help is appreciated.

    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  2. #2
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    3,663
    Plugin Contributions
    55

    Default Re: Reviews

    Giving this a bump... I need to be able to pull reviews to update Super Data. Maybe I'm missing the obvious, but... I cannot build the query for other pages, such as the product page like I need.
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  3. #3
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    850
    Plugin Contributions
    12

    Default Re: Reviews

    Quote Originally Posted by mprough View Post
    Giving this a bump... I need to be able to pull reviews to update Super Data. Maybe I'm missing the obvious, but... I cannot build the query for other pages, such as the product page like I need.
    I have reviews, display/write on product pages, with average ratings adds another module to the page. Loads into a tab on the product page.. This the query it uses.
    Code:
    // if review must be approved or disabled do not show review
        $review_status = " and r.status = '1'";
    
        $reviews_query = "select count(*) as count from " . TABLE_REVIEWS . " r, "
                                                           . TABLE_REVIEWS_DESCRIPTION . " rd
                           where r.products_id = '" . (int)$_GET['products_id'] . "'
                           and r.reviews_id = rd.reviews_id
                           and rd.languages_id = '" . (int)$_SESSION['languages_id'] . "'" .
                           $review_status;
    
        $reviews = $db->Execute($reviews_query);
    
        // 2P added BOF - Average Product Rating
        $reviews_average_rating_query = "select avg(reviews_rating) as average_rating from " . TABLE_REVIEWS . " r, "
                                                           . TABLE_REVIEWS_DESCRIPTION . " rd
                           where r.products_id = '" . (int)$_GET['products_id'] . "'
                           and r.reviews_id = rd.reviews_id
                           and rd.languages_id = '" . (int)$_SESSION['languages_id'] . "'" .
                           $review_status;
    
        $reviews_average_rating = $db->Execute($reviews_average_rating_query);
        
    $reviews_query_raw = "select *
                          from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd
                          where r.products_id = '" . (int)$_GET['products_id'] . "'
                          and r.reviews_id = rd.reviews_id
                           and rd.languages_id = '" . (int)$_SESSION['languages_id'] . "'" .
                           $review_status;
    
    $reviews_split = new splitPageResults($reviews_query_raw, 10);
    Not sure if that's what you need, live on a zc1.5.6b, PHP7.3.0 site
    Dave
    Always forward thinking... MySite..

  4. #4
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,009
    Plugin Contributions
    29

    Default Re: Reviews

    I have this already done in my version on github.
    Steve
    github.com/torvista: Apsona (php7), BackupMySQL Admin/Auto, Product Listing Sorter, Redsys payment module, Spanish Language Pack and more...

  5. #5
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    3,663
    Plugin Contributions
    55

    Default Re: Reviews

    Thanks Dave, that worked perfectly
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

 

 

Similar Threads

  1. Replies: 4
    Last Post: 24 Oct 2015, 05:54 AM
  2. Replies: 2
    Last Post: 22 Aug 2011, 09:20 PM
  3. Reviews - uploading pre-written reviews?
    By towerhealth in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 10 Nov 2010, 12:32 PM
  4. Reviews Sidebox - How to add reviews?
    By SpiceGlow in forum Basic Configuration
    Replies: 5
    Last Post: 24 Oct 2009, 05:12 PM
  5. 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

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