Originally Posted by
DarkAngel
I think this pos of mine is solved, for now cause you never know with this store...LOL
https://www.zen-cart.com/showthread....hlight=reviews
But I was wondering. The reviewupdated mod is being used in conjuction with dgReiews old mod. I get the guests being able to write a review and their not needing to use last name but just first name with last initial.
Would like to get this verion of cart to do the same thing with the logged in customer.
This is the code I was told to do with 1.3.9h store but it does not work in this version because of the ConCat part so could someone please tell me what the code should be.
I noticed that if I go to the product_reviews_write/header_php.php and remove the text in red that it lets only the first name show but would really like the initial too PLUS not sure if this will affect other stuff in the coding so I put the text back.
if (!$_SESSION['customer_id']) {
$customer = '';
} else {
$customer_query = "SELECT customers_firstname,
customers_lastname, customers_email_address
FROM " . TABLE_CUSTOMERS . "
WHERE customers_id = :customersID";
Ummm,
Code:
$customer_query = "SELECT customers_firstname, CONCAT(LEFT(customers_lastname,0),'.') AS customers_lastname, customers_email_address
FROM " . TABLE_CUSTOMERS . "
WHERE customers_id = :customersID";
Says to use zero characters of the left side of customers_lastname and concat that with a period... Which that all may actually be null, which doesn't sound like a favorable return value..
Try:
Code:
$customer_query = "SELECT customers_firstname, CONCAT(LEFT(customers_lastname,1),'.') AS customers_lastname, customers_email_address
FROM " . TABLE_CUSTOMERS . "
WHERE customers_id = :customersID";
Bookmarks