Thread: Edit Reviews

Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2005
    Location
    Mosquito Coast, Texas
    Posts
    92
    Plugin Contributions
    0

    Default Edit Reviews

    What files would I need to edit to remove the customer's last name from the Reviews page. Many customers won't leave reviews if their last name is displayed. I'd like to fix this if possible

    thanks in advance
    Terri

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Edit Reviews

    Look at the file for writing the reviews where the customer name is inserted into the database table ...
    \includes\modules\pages\product_reviews_write\header_php.php
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jan 2005
    Location
    Mosquito Coast, Texas
    Posts
    92
    Plugin Contributions
    0

    Default Re: Edit Reviews

    Quote Originally Posted by Ajeh View Post
    Look at the file for writing the reviews where the customer name is inserted into the database table ...
    \includes\modules\pages\product_reviews_write\head er_php.php
    Tried that, it no workie. Tried the tpl files too. I either get no name at all, or the full name.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Edit Reviews

    Look in the header_php.php file around lines 74 - 81 and you will see where the INSERT is built from the customer name info.
    PHP Code:
        $sql "INSERT INTO " TABLE_REVIEWS " (products_id, customers_id, customers_name, reviews_rating, date_added, status)
                VALUES (:productsID, :customersID, :customersName, :rating, now(), " 
    $review_status ")";


        
    $sql $db->bindVars($sql':productsID'$_GET['products_id'], 'integer');
        
    $sql $db->bindVars($sql':customersID'$_SESSION['customer_id'], 'integer');
        
    $sql $db->bindVars($sql':customersName'$customer->fields['customers_firstname'] . ' ' $customer->fields['customers_lastname'], 'string');
        
    $sql $db->bindVars($sql':rating'$rating'string'); 
    You can alter the customersName from being first name and last name to being just the firstname ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5

    Default Re: Edit Reviews

    I edited the line to the following and still see the customer's full name...is there something else that needs to be changed?

    $sql = $db->bindVars($sql, ':customersName', $customer->fields['customers_firstname'], 'string');


    thanks!

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Edit Reviews

    NOTE: this is going to fix new reviews not existing ones ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Oct 2007
    Location
    Australia
    Posts
    843
    Plugin Contributions
    0

    Default Re: Edit Reviews

    Quote Originally Posted by Ajeh View Post
    Look in the header_php.php file around lines 74 - 81 and you will see where the INSERT is built from the customer name info.
    PHP Code:
        $sql "INSERT INTO " TABLE_REVIEWS " (products_id, customers_id, customers_name, reviews_rating, date_added, status)
                VALUES (:productsID, :customersID, :customersName, :rating, now(), " 
    $review_status ")";


        
    $sql $db->bindVars($sql':productsID'$_GET['products_id'], 'integer');
        
    $sql $db->bindVars($sql':customersID'$_SESSION['customer_id'], 'integer');
        
    $sql $db->bindVars($sql':customersName'$customer->fields['customers_firstname'] . ' ' $customer->fields['customers_lastname'], 'string');
        
    $sql $db->bindVars($sql':rating'$rating'string'); 
    You can alter the customersName from being first name and last name to being just the firstname ...
    Thanx Ajeh, I implemented this and it works beautifully
    HunnyBee Design
    "A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Edit Reviews

    Thanks for the update that this is working for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

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. How do I edit the reviews table in the database?
    By jabula in forum General Questions
    Replies: 6
    Last Post: 12 Aug 2009, 10:03 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