Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 43
  1. #11

    Default Re: Customer Reviews, their full name is diplayed?

    Lesli,

    Any chance you feel like elaborating?
    If you must smoke, please do so electronically.

  2. #12
    Join Date
    Nov 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: Customer Reviews, their full name is diplayed?

    My solution was to split the reviewer's name into first and last name, then truncate the last name to the first letter.

    copy template_default/templates/tpl_product_reviews_info_default.php to YOUR_TEMPLATE/templates/

    then replace:

    <div id="reviewsInfoDefaultMainContent" class="content"><?php echo zen_break_string(nl2br(zen_output_string_protected(stripslashes($review_info->fields['reviews_text']))), 60, '-<br />'); ?></div>
    <div id="reviewsInfoDefaultDate" class="bold"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen_date_short($review_info->fields['date_added'])); ?>&nbsp;<?php echo sprintf(TEXT_REVIEW_BY, zen_output_string_protected($review_info->fields['customers_name'])); ?></div>

    with:

    <div id="reviewsInfoDefaultMainContent" class="content"><?php echo zen_break_string(nl2br(zen_output_string_protected(stripslashes($review_info->fields['reviews_text']))), 60, '-<br />'); ?></div>
    <div id="reviewsInfoDefaultDate" class="bold"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen_date_short($review_info->fields['date_added'])); ?>&nbsp;<?php
    list($review_first_name, $review_last_name) = split(' ', zen_output_string_protected($review_info->fields['customers_name']));
    $last_name_array = str_split($review_last_name,1);
    echo sprintf(TEXT_REVIEW_BY, $review_first_name).' '.$last_name_array[0].'.'; ?></div>

    [I selected the entire div to make the section easier to find]

    it changes the review information from "by John Smith" to "by John S."

    Hope it helps

  3. #13
    Join Date
    Jan 2010
    Location
    Tucson, AZ, USA
    Posts
    2
    Plugin Contributions
    0

    Default Re: Customer Reviews, their full name is diplayed?

    I have successfully been able to remove the first and last name, but how do I remove the word "by". For example, once customers post a review it now reads:

    Date Added: 01/14/2010 by

    Where do I remove the "by" word? Any help would be appreciated. Thank you,

    Miguel

  4. #14
    Join Date
    Mar 2010
    Posts
    8
    Plugin Contributions
    0

    Default Re: Customer Reviews, their full name is diplayed?

    Thanks Richuno, worked like a charm!

  5. #15
    Join Date
    Feb 2007
    Location
    Barcelona
    Posts
    201
    Plugin Contributions
    0

    Default Re: Customer Reviews, their full name is diplayed?

    I tweked "lightly" the richuno´s code for showing first letter of the two lastnames for languages like spanish, with FIRSTNAME LASTNAME LASTNAME:

    Code:
     
    <div id="reviewsInfoDefaultDate" class="bold"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen_date_short($review_info->fields['date_added'])); ?>&nbsp;<?php 
    list($review_first_name, $review_last_name1, $review_last_name2) = split(' ', zen_output_string_protected($review_info->fields['customers_name']));
    $last_name_array1 = str_split($review_last_name1,1);
    $last_name_array2 = str_split($review_last_name2,1);
    echo sprintf(TEXT_REVIEW_BY, $review_first_name).' '.$last_name_array1[0].'. '.$last_name_array2[0].' '; ?></div>
    Hope this helps !!

  6. #16
    Join Date
    Mar 2007
    Location
    Taiwan
    Posts
    241
    Plugin Contributions
    0

    Default Re: Customer Reviews, their full name is diplayed?

    The patches above all have the same problem: when the customer goes to write a review, the page has a big heading - "Written by Joe Blow"

    So any customer who does not want his full name used on a review will be scared off by seeing his full name.

    There's a simple solution - /includes/templates/template_default/templates/tpl_product_reviews_write_default.php

    Copy this file to your template folder i.e. /includes/templates/YOUR_TEMPLATE/templates/tpl_product_reviews_write_default.php

    About line 40 - change this line:

    <h3 id="reviewsWriteReviewer" class=""><?php echo SUB_TITLE_FROM, zen_output_string_protected($customer->fields['customers_firstname'] . ' ' . $customer->fields['customers_lastname']); ?></h3>

    to this:

    <h3 id="reviewsWriteReviewer" class=""><?php echo SUB_TITLE_FROM, zen_output_string_protected($customer->fields['customers_firstname'] . ' ' . $customer->fields['customers_lastname']{0} . '.'); ?></h3>

    This truncates the last name to the first initial and adds a period.

    Now the write a review page shows "Written by Joe B."

    When you get a new review, go into the database and change the name on the review to Joe B.

  7. #17
    Join Date
    Mar 2009
    Posts
    48
    Plugin Contributions
    0

    Default Re: Customer Reviews, their full name is diplayed?

    hey guys, I'm trying to implement this change. I did what richuno suggested.

    It seems to have worked fine on the individual pages, such as this one:
    http://www.iscatech.com/ecommerce/in...4&reviews_id=8

    But not on these pages:
    http://www.iscatech.com/ecommerce/in...&products_id=4
    http://www.iscatech.com/ecommerce/in...n_page=reviews

  8. #18
    Join Date
    Dec 2009
    Posts
    234
    Plugin Contributions
    0

    Default Re: Customer Reviews, their full name is diplayed?

    Thanks to Richuno and Paul3648, Ive modified the code to truncate the last name on two of the reviews pages.

    There's one more page you need to modify if people are looking at a whole page of reviews. This url; www.MYSITE.COM/index.php?main_page=reviews - is driven by this page; tpl_reviews_default.php - which is also in the includes/templates/YOUR_TEMPLATE/templates directory of the other files mentioned above.

    Around line 45 change the code; <div class="bold"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen_date_short($reviews->fields['date_added'])); ?>&nbsp;<?php echo sprintf(TEXT_REVIEW_BY, zen_output_string_protected($reviews->fields['customers_name'])); ?></div>

    to this;

    <div class="bold"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen_date_short($reviews->fields['date_added'])); ?>&nbsp;<?php
    list($review_first_name, $review_last_name) = split(' ', zen_output_string_protected($reviews->fields['customers_name']));$last_name_array = str_split($review_last_name,1); echo sprintf(TEXT_REVIEW_BY, $review_first_name).' '.$last_name_array[0].'.'; ?></div>
    Donation made. Enjoy those donuts! :-)

  9. #19
    Join Date
    Dec 2009
    Posts
    234
    Plugin Contributions
    0

    Default Re: Customer Reviews, their full name is diplayed?

    This will also need to be changed on the product display page itself (within the tpl_product_info_display.php). ill hunt around and post the change if I can.
    Last edited by Scott_C; 5 Oct 2010 at 04:33 AM.
    Donation made. Enjoy those donuts! :-)

  10. #20
    Join Date
    Mar 2009
    Posts
    48
    Plugin Contributions
    0

    Default Re: Customer Reviews, their full name is diplayed?

    Quote Originally Posted by Scott_C View Post
    This will also need to be changed on the product display page itself (within the tpl_product_info_display.php). ill hunt around and post the change if I can.
    Thanks Scott, I made your change and it works. I think the last place it needs a change is on the tpl_product_info_display.php like you suggested. Let us know if you find it!

 

 
Page 2 of 5 FirstFirst 1234 ... LastLast

Similar Threads

  1. v150 Stars and product name in reviews sidebox - customer pic
    By wyewyewye in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 26 Aug 2012, 09:09 AM
  2. How do I hide customer's last name on product reviews?
    By Bob88Vette in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 18 May 2010, 06:01 PM
  3. Problem removing customer last name from reviews using override
    By crewcut451 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 8 Sep 2009, 08:07 AM
  4. Customer Reviews - displaying the name
    By ginginca in forum General Questions
    Replies: 1
    Last Post: 18 Feb 2007, 11:52 PM
  5. Display customer full name....
    By mpadilla2 in forum Addon Sideboxes
    Replies: 0
    Last Post: 2 Jul 2006, 10:26 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