Forums / General Questions / What shows in a customer review?

What shows in a customer review?

Views: 14,125

Results 21 to 40 of 48
27 Aug 2008, 4:57 PM
#21
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

What shows in a customer review?

I'll try this one too...about including the city and state.

You see, this is info residing in tables in a database that cross over each other using a customer address id.

We'd love to do this also but it would mean matching the customer address id with their info in the address book table in the database.

Has anyone done this? Seems that for a file that is not part of the over-ride system this would be a little dicey to do.

16 Sep 2008, 2:59 PM
#22
redcinamn avatar

redcinamn

Zen Follower

Join Date:
Oct 2006
Posts:
175
Plugin Contributions:
0

Re: What shows in a customer review?

I am not having any luck with this? I have removed customers_lastname from line:

Line 80:
$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[''], 'string');
$sql = $db->bindVars($sql, ':rating', $rating, 'string');

Line 42

$customer_query = "SELECT customers_firstname, customers_email_address
FROM " . TABLE_CUSTOMERS . "
WHERE customers_id = :customersID";

I have made three test posts and all show last name can anyone help?

version 1 .3 .7

Site http://www.crystalsoftime.com

thanks in advance!

Red

16 Sep 2008, 3:28 PM
#23
redcinamn avatar

redcinamn

Zen Follower

Join Date:
Oct 2006
Posts:
175
Plugin Contributions:
0

Re: What shows in a customer review?

I found my problem a simple coma thank you though! (post #3 works beautifully)

Renee

Red

7 Oct 2008, 8:13 PM
#24
letsmod avatar

letsmod

New Zenner

Join Date:
Sep 2008
Posts:
42
Plugin Contributions:
0

Re: What shows in a customer review?

this is what I did.

Edit this file (I used Wordpad)

/includes/modules/pages/product_reviews_write/header_php.php

change:

    $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');

    $db->Execute($sql);

to:

    $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'], 'string');
    $sql = $db->bindVars($sql, ':rating', $rating, 'string');

    $db->Execute($sql);
13 Oct 2008, 10:50 PM
#25
cookie_juice avatar

cookie_juice

New Zenner

Join Date:
Oct 2008
Posts:
25
Plugin Contributions:
0

Re: What shows in a customer review?

To remove the date on the reviews page and the product_reviews_info pages:

Is the best way to remove : r.date_added from the headers?

 $review_info_query = "SELECT rd.reviews_text, r.reviews_rating, r.reviews_id, r.customers_name,
                              r.date_added, r.reviews_read, p.products_id, p.products_price,
                               p.products_tax_class_id, p.products_image, p.products_model, pd.products_name
                        FROM " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                        WHERE r.reviews_id = :reviewsID
                        AND r.reviews_id = rd.reviews_id
                        AND rd.languages_id = :languagesID
                        AND r.products_id = p.products_id
                        AND p.products_status = '1'
                        AND p.products_id = pd.products_id
                        AND pd.language_id = :languagesID " . $review_status;

and remove the Date Added: text in the english files?

Is this safe to do regarding the db?
Or is a bad idea? and is there a better way?

13 Oct 2008, 11:06 PM
#26
cookie_juice avatar

cookie_juice

New Zenner

Join Date:
Oct 2008
Posts:
25
Plugin Contributions:
0

Re: What shows in a customer review?

woops... product_reviews page too.

18 Oct 2008, 7:33 PM
#27
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: What shows in a customer review?

Simply remove "Date Added: %s" from your english file.:cool:

define('TEXT_REVIEW_DATE_ADDED', '');

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

22 Nov 2008, 4:28 PM
#28
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: What shows in a customer review?

Thank you for the last name fix! Worked like a charm. :smile:

This may not be possible, but ideally I would like to have the customer's first name and last initial.

Is there a way to do this?

I'll finish that project tomorrow, I've made enough mistakes today!

6 Dec 2008, 8:43 PM
#29
ccembd avatar

ccembd

New Zenner

Join Date:
Apr 2008
Location:
Calif
Posts:
86
Plugin Contributions:
0

Re: What shows in a customer review?

Thank you for this post. It worked like a charm. Since I am horrilbe at knowing what to remove and still keep things working I did the following changes.

From this:

$customer_query = "SELECT customers_firstname, customers_lastname, customers_email_address
                   FROM " . TABLE_CUSTOMERS . "
                   WHERE customers_id = :customersID";

To this:

$customer_query = "SELECT customers_firstname, customers_email_address
                   FROM " . TABLE_CUSTOMERS . "
                   WHERE customers_id = :customersID";

And,
From this:

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

To this:

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

I don't care if the city shows up or not, and it doesn't.

Thanks again :bigups:

6 Feb 2009, 1:33 PM
#30
mylildarlings avatar

mylildarlings

New Zenner

Join Date:
Oct 2008
Posts:
21
Plugin Contributions:
0

Re: What shows in a customer review?

Thanks! This worked for me for just last name. (not concerned about city in my case)

Although, any help changing existing customers would be appreciated :)

8 Jun 2009, 3:22 AM
#31
gambitjoe avatar

gambitjoe

New Zenner

Join Date:
Jun 2009
Posts:
1
Plugin Contributions:
0

Re: What shows in a customer review?

LittleOleMeDesigns:

Is there any way to make it show First Name and the Customer's City.... or first name and the customer's Forum ID if you have a forum set up from the start??

I did this as follows....

  1. Modify the following file:
    /includes/modules/pages/product_reviews_write/header_php

  2. Add a query to pull the city

// customer entry query added
$customer_city_query = "SELECT entry_city FROM " . TABLE_ADDRESS_BOOK . " WHERE customers_id = :customersID LIMIT 1";
$customer_city_query = $db->bindVars($customer_city_query, ':customersID', $_SESSION['customer_id'], 'integer');
$customer_city = $db->Execute($customer_city_query);

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

to:

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

This worked for me...hopefully it works for you.

17 Sep 2009, 5:07 PM
#32
time111 avatar

time111

New Zenner

Join Date:
Sep 2008
Posts:
95
Plugin Contributions:
0

Re: What shows in a customer review?

dharma:

Simply remove "Date Added: %s" from your english file.:cool:

define('TEXT_REVIEW_DATE_ADDED', '');


Hello,

I tried this on following file "includes/languages/english.php"

But im getting following line in place of date **TEXT_REVIEW_DATE_ADDED**, on reviews page.

Please anybody help where im going wrong.

~ Time
17 Sep 2009, 5:46 PM
#33
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: What shows in a customer review?

Go to the Tools ... Developers Tool Kit ...

In the bottom input box enter:
TEXT_REVIEW_DATE_ADDED

select Catalog and click search ...

Check what files have that defined ...

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!]
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!

18 Sep 2009, 9:41 AM
#34
time111 avatar

time111

New Zenner

Join Date:
Sep 2008
Posts:
95
Plugin Contributions:
0

Re: What shows in a customer review?

Ajeh:

Go to the Tools ... Developers Tool Kit ...

In the bottom input box enter:
TEXT_REVIEW_DATE_ADDED

select Catalog and click search ...

Check what files have that defined ...

Hi,

I checked its showing following files:

includes/languages/english.php
includes/templates/MyTemplate/templates/tpl_product_reviews_default.php
includes/templates/MyTemplate/templates/tpl_product_reviews_info_default.php
includes/templates/MyTemplate/templates/tpl_reviews_default.php
includes/templates/template_default/templates/tpl_product_reviews_default.php
includes/templates/template_default/templates/tpl_product_reviews_info_default.php
includes/templates/template_default/templates/tpl_reviews_default.php

Do I have to edit all above given files or any particular? And what should be edited?

~ Time

18 Sep 2009, 1:59 PM
#35
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: What shows in a customer review?

Which of those file(s) have the define statement in it?

By default, it would look like:
define('TEXT_REVIEW_DATE_ADDED', 'Date Added: %s');

What do you see for the define(s)? Is there only 1, or more than 1?

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!]
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!

19 Sep 2009, 10:25 AM
#36
time111 avatar

time111

New Zenner

Join Date:
Sep 2008
Posts:
95
Plugin Contributions:
0

Re: What shows in a customer review?

Ajeh:

Which of those file(s) have the define statement in it?

By default, it would look like:
define('TEXT_REVIEW_DATE_ADDED', 'Date Added: %s');

What do you see for the define(s)? Is there only 1, or more than 1?

Hi,

Its given only in 1 file i.e. includes/languages/english.php

But when I comment it out:
// define('TEXT_REVIEW_DATE_ADDED', 'Date Added: %s');

its showing on review page like this
TEXT_REVIEW_DATE_ADDED by TEST NAME

Waiting for your inputs.

~ Time

19 Sep 2009, 11:14 AM
#37
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: What shows in a customer review?

Are you currently overriding that file, like this:
includes/languages/your_template/english.php

If so, you will need to add the define to that file, like this:

define('TEXT_REVIEW_DATE_ADDED', 'Date Added: %s');
19 Sep 2009, 3:34 PM
#38
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: What shows in a customer review?

time111:

Hi,
But when I comment it out:
// define('TEXT_REVIEW_DATE_ADDED', 'Date Added: %s');

its showing on review page like this
TEXT_REVIEW_DATE_ADDED by TEST NAME

You don't want to comment that define out, or you see the constant on the screen ...

To make it not show, set it to:
define('TEXT_REVIEW_DATE_ADDED', '');

NOTE: as Steven300 suggested, make sure that your are using your templates and overrides ... :smile:

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!]
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!

19 Sep 2009, 4:10 PM
#39
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: What shows in a customer review?

Hi Ajeh. Although using the override system is always good practice, my post wasn't meant to recommend it. I just thought it might be the case that includes/languages/english.php was already being overridden, but the override file was missing the define statement. Therefore, when searching using the Developer's Tool Kit for the define statement, it would point to the original language file even though it's not at fault. I suggested this because I thought time111 had already tried without the define statement commented out, but maybe he/she hasn't :smile:

19 Sep 2009, 6:58 PM
#40
time111 avatar

time111

New Zenner

Join Date:
Sep 2008
Posts:
95
Plugin Contributions:
0

Re: What shows in a customer review?

Hi,

Thank both of you for your time and explanation. I'm able to do that now.

I have now also made an overriding file as precaution so in future it could be helpful for any changes.

~ Time