Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2009
    Posts
    25
    Plugin Contributions
    0

    Default Reviews Customization

    I have a couple of questions.

    1. A user wants to leave a review but does not want it to show her first AND last name. How do I edit the usernames when someone leaves a review?

    2. I want to show the reviews on the product page. Right now, it shows a 'write review' button and clicking on that brings you to the reviews ans write review option (http://www.ktnaturals.com/index.php?...products_id=35)

  2. #2
    Join Date
    Apr 2008
    Location
    United Kingdom
    Posts
    27
    Plugin Contributions
    0

    Default Re: Reviews Customization

    Hi,
    I want to do the same too.
    One way to do it is to edit the file \includes\modules\pages\product_reviews_write\header_php

    Find the line starting
    Code:
    $customer_query = "SELECT customers_firstname
    and change to

    Code:
    $customer_query = "SELECT customers_firstname, customers_email_address
                       FROM " . TABLE_CUSTOMERS . "
                       WHERE customers_id = :customersID";
    This will then leave first name on reviews. The only down side is that it will not show you exactly who wrote the review.

    Not the ideal work around as it leaves reviews open to abuse.

    Sorry I don't know a better way but I am not very good at PHP programming but thought I would share this in case it suited your needs

  3. #3
    Join Date
    Apr 2008
    Location
    United Kingdom
    Posts
    27
    Plugin Contributions
    0

    Default Re: Reviews Customization

    OK,

    BEFORE STARTING BACKUP YOUR FILE. THIS EDITS A CORE FILE

    Here is a better solution: This allows the full name to be stored for the site owner but display only a first name on the review screen.

    Ignore my previous post and leave that file alone.
    The file to revise for displaying one name only is
    Code:
    includes\modules\pages\product_reviews\header_php
    Find this section:
    Code:
    $reviewsArray = array();
      while (!$reviews->EOF) {
      	$reviewsArray[] = array('id'=>$reviews->fields['reviews_id'],
      	                        'customersName'=>$reviews->fields['customers_name'],
      	                        'dateAdded'=>$reviews->fields['date_added'],
      	                        'reviewsText'=>$reviews->fields['reviews_text'],
      	                        'reviewsRating'=>$reviews->fields['reviews_rating']);
        $reviews->MoveNext();
      }
    change to
    Code:
      $reviewsArray = array();
      while (!$reviews->EOF) {
    	$array=explode(" ",$reviews->fields['customers_name']);
    	$array_count=count($array);
    	echo $array_count;
    	$sentence=$array[0];
      	$reviewsArray[] = array('id'=>$reviews->fields['reviews_id'],
      	                        'customersName'=>$sentence,
      	                        'dateAdded'=>$reviews->fields['date_added'],
      	                        'reviewsText'=>$reviews->fields['reviews_text'],
      	                        'reviewsRating'=>$reviews->fields['reviews_rating']);
    
        $reviews->MoveNext();
      }
    I take no credit for this. I used google to search on how to find a space and just modified it slightly to work. Use at your own risk.

  4. #4
    Join Date
    Jun 2009
    Posts
    25
    Plugin Contributions
    0

    Default Re: Reviews Customization

    Thank you so much! Worked! :)

 

 

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. Customization of Reviews Feature
    By jill8026 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Mar 2011, 02:02 AM
  4. Reviews - uploading pre-written reviews?
    By towerhealth in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 10 Nov 2010, 12:32 PM
  5. Reviews Sidebox - How to add reviews?
    By SpiceGlow in forum Basic Configuration
    Replies: 5
    Last Post: 24 Oct 2009, 05:12 PM

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