Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Nov 2009
    Location
    Sydney Australia
    Posts
    84
    Plugin Contributions
    0

    Default Product Reviews from Buyers Only

    When I first created my ZC shop several years ago, I opted against Product Reviews - not sure what my logic was . . . ;)

    In any event I want to re-enable some kind of Product Review functionality, but I'm not sure ZC's off-the-shelf version is going to cut it.

    I see lots of people want to offer review functionality to guests, but I want to do the opposite. I only want actual buyers of a product to be able to review it. I don't really care if Joe Random likes our product, if he is not a buyer, and has not actually "experienced" what we are selling. I get general product opinions on our Facebook Page, but I want our site product reveiws to really mean something. I think it also adds more credibility if one must be an actual user, in order to offer a review...but that is my opinion.

    I suppose the way I would want to get reviews is to send follow-up e-mails, two weeks after purchase. These would ask buyers (and perhaps incentivise them) to review the product, and/or offer a general testimonial. Additionally, the next time the customer logs in, he/she would be reminded to review not-yet-reviewed products purchased previously (one reminder, and then let it go).

    Is this all too complicated, or would it be easier to create this outside of Zen Cart, and then somehow integrate the reviews back in? Would be interested in chatting with someone who has done this, or somebody who knows of some sites (zen or non-zen) that do this well.

    Look forward to your feedback/suggestions.
    Sean M - Sydney, Australia

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

    Default Re: Product Reviews from Buyers Only

    As a start, customize the file:
    /includes/modules/pages/product_reviews_write/header_php.php

    and add the code in RED:
    Code:
    if (!$_SESSION['customer_id']) {
      $_SESSION['navigation']->set_snapshot();
      zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
    }
    // bof: check customer bought product before allowing creation of a review
    $customers_query_raw = "select c.customers_id, c.customers_firstname, c.customers_lastname, sum(op.products_quantity * op.final_price)+sum(op.onetime_charges) as ordersum from " . TABLE_CUSTOMERS . " c, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS . " o where c.customers_id = o.customers_id and o.orders_id = op.orders_id and op.products_id = :productsID";
    $customers_query_raw = $db->bindVars($customers_query_raw, ':productsID', $_GET['products_id'], 'integer');
    $customers_query = $db->Execute($customers_query_raw);
    if ($customers_query->EOF) {
    //  $messageStack->add_session('header', 'Customer Bought this', 'caution');
    } else {
      $messageStack->add_session('header', 'Customer did NOT buy this', 'caution');
      zen_redirect(zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params(array('reviews_id'))));
    }
    // eof: check customer bought product before allowing creation of a review
    NOTE: you could make this the only change or get fancier based on where the customer is, are they logged in, did they buy the product, etc. etc. etc.
    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 2010
    Location
    France
    Posts
    279
    Plugin Contributions
    0

    Default Re: Product Reviews from Buyers Only

    Hello Ajeh I tried your code, but I do not work once you put the code you insert any reviews yet. Even if the customer has already bought the product. Can you help me with this code

    thanks

    V1.5.1

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

    Default Re: Product Reviews from Buyers Only

    Could you explain what you mean by "I do not work" ... are you getting error messages? Or what is happening?
    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
    Join Date
    Jan 2010
    Location
    France
    Posts
    279
    Plugin Contributions
    0

    Default Re: Product Reviews from Buyers Only

    Sorry for the bad English. It seems to work, but I'm not even enter the reviews there is no box to type in, check the message that says Customer did NOT buy this.

  6. #6
    Join Date
    Jan 2010
    Location
    France
    Posts
    279
    Plugin Contributions
    0

    Default Re: Product Reviews from Buyers Only

    I put a print, and in fact as if the client had not purchased the product

    Name:  Schermata 2013-10-18 alle 19.25.43.jpg
Views: 102
Size:  34.6 KB

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

    Default Re: Product Reviews from Buyers Only

    All that this change does is that if the Customer tries to use the Write Review a chack is done on the Orders made by the customer and if there is not an Order of the Product then the message in yellow shows that says:
    Customer did NOT buy this

    and the Customer cannot write a review ... and the Customer is taken to the page for:
    product_reviews

    for that Product ...

    You can change the message to anything you want it to be ...

    What actually isn't working right for you? Based on the image you are showing, it is doing exactly that ...
    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!

  8. #8
    Join Date
    Jan 2010
    Location
    France
    Posts
    279
    Plugin Contributions
    0

    Default Re: Product Reviews from Buyers Only

    The message I know that I can change. the problem is that the customer bought the product but does not write the review also when he bought the product. And as if the customer has not bought the product.

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

    Default Re: Product Reviews from Buyers Only

    Try making two changes to that code, the first replace the whole line with this new line of code:
    Code:
    $customers_query_raw = "select c.customers_id, c.customers_firstname, c.customers_lastname from " . TABLE_CUSTOMERS . " c, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS . " o where c.customers_id = o.customers_id and o.orders_id = op.orders_id and op.products_id = :productsID";
    and the second add the !:
    Code:
    if (!$customers_query->EOF) {
    See if that works better 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!

  10. #10
    Join Date
    Jan 2010
    Location
    France
    Posts
    279
    Plugin Contributions
    0

    Default Re: Product Reviews from Buyers Only

    Mr. Ajeh! you are a magician works great thank you very much
    This deserves another donation

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Exclusive Products to Approved Buyers Only
    By Rick5150 in forum General Questions
    Replies: 0
    Last Post: 25 Apr 2012, 09:38 AM
  2. Replies: 9
    Last Post: 11 Feb 2011, 12:37 AM
  3. Product Reviews First Name Only
    By muah in forum General Questions
    Replies: 3
    Last Post: 5 Sep 2010, 02:27 AM
  4. Remove product reviews on main page only
    By robbinsgj in forum Templates, Stylesheets, Page Layout
    Replies: 16
    Last Post: 21 Jun 2010, 06:39 AM
  5. Reviews box only on the product page
    By attroll in forum General Questions
    Replies: 0
    Last Post: 12 Jun 2009, 06:20 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