Page 1 of 2 12 LastLast
Results 1 to 10 of 126

Hybrid View

  1. #1
    Join Date
    Oct 2010
    Location
    United Kingdom
    Posts
    477
    Plugin Contributions
    0

    Default Re: Reviews - Updated [Support Thread]

    what a beauty .. Backed up everything 1st and tested & installed, worked fine on my site
    Only thing is the name if you submit less than 5 letter it fails
    Code:
    Your Name needs to have at least 5 characters.
    I've added text in the English

    Thanks for a great add-on

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,949
    Plugin Contributions
    96

    Default Re: Reviews - Updated [Support Thread]

    There's an admin configuration switch that controls the minimum length of the guest reviewer's name:

    Configuration->Minimum Values->Product Review Write - Guest Reviewer Name

    The default value is 5.

    On another topic, I was informed by swguy that if you run the SQL install patches using your admin's Tools->Install SQL Patches that the tool "takes care of" the database prefix settings in your configuration. In other words, you can use the SQL patches provided in the plugin as-is even if you use a database prefix (DB_PREFIX in your configure.php files is set to something other than ''). I'll update the readme file to reflect this in a subsequent release.
    Last edited by lat9; 14 Jul 2012 at 11:41 PM. Reason: SQL Patch information updated

  3. #3
    Join Date
    Oct 2010
    Location
    United Kingdom
    Posts
    477
    Plugin Contributions
    0

    Default Re: Reviews - Updated [Support Thread]

    oops you are correct..never thought of the most simplest of things
    thank you again

  4. #4
    Join Date
    Jan 2012
    Posts
    48
    Plugin Contributions
    0

    Default Re: Reviews - Updated [Support Thread]

    Could admin reply the review? or once a review posted, send an email to admin?

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,949
    Plugin Contributions
    96

    Default Re: Reviews - Updated [Support Thread]

    Your admin could reply to the review by writing a new review on the product and entering Store Owner in the "Your Name" field.

    There are configuration values in your admin's Configuration->E-mail Options that will enable sending an email when a review is posted:

    Send Notice of Pending Reviews Emails To - Status: Enables (1) or disables (0) the sending of the email to the list specified by ...
    Send Notice of Pending Reviews Emails To: A list of email addresses to receive the notice of a pending/posted review

  6. #6
    Join Date
    Jul 2009
    Posts
    101
    Plugin Contributions
    0

    Default Re: Reviews - Updated [Support Thread]

    I'm about to try this addon .. but... is there a way to use the 'write a review' from the home page? I want someone to just send a general review from the front page rather than having to drill down to a product..
    Yolanda

  7. #7
    Join Date
    Jul 2009
    Posts
    101
    Plugin Contributions
    0

    Default Re: Reviews - Updated [Support Thread]

    Nevermind... I am using the Testimonials addon that works good for me.

    Best
    Yolanda

    Quote Originally Posted by Yolanda View Post
    I'm about to try this addon .. but... is there a way to use the 'write a review' from the home page? I want someone to just send a general review from the front page rather than having to drill down to a product..
    Yolanda

  8. #8
    Join Date
    May 2012
    Posts
    29
    Plugin Contributions
    0

    Default Re: Reviews - Updated [Support Thread]

    Hi, I noticed two bugs of this module.
    1.it only accounts for newly written review.
    2. In admin review page,customers' name are shown the same as reviews.php in front website page. I want the customer's full name are shown in admin review page.
    Can you solve this two bugs?
    Thanks!

  9. #9
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

    Default Re: Reviews - Updated [Support Thread]

    Quote Originally Posted by asdfwen View Post
    Hi, I noticed two bugs of this module.
    1.it only accounts for newly written review.
    2. In admin review page,customers' name are shown the same as reviews.php in front website page. I want the customer's full name are shown in admin review page.
    Can you solve this two bugs?
    Thanks!
    Don't you think that these are requests, no 'bugs'?

  10. #10
    Join Date
    Jan 2014
    Location
    United States
    Posts
    28
    Plugin Contributions
    0

    Default Re: Reviews - Updated [Support Thread]

    Thanks!

    Code:
    <?php
    /**
     * reviews Write
     *
     * @package page
     * @copyright Copyright 2003-2012 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version GIT: $Id: Author: DrByte  Sat Jul 21 16:05:31 2012 -0400 Modified in v1.5.1 $
     */
    /**
     * Header code file for product reviews "write" page
     */
    
    // This should be first line of the script:
    $zco_notifier->notify('NOTIFY_HEADER_START_PRODUCT_REVIEWS_WRITE');
      
    require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
    
    if (REVIEWS_BY_GUESTS != '1' && !$_SESSION['customer_id']) {
      $_SESSION['navigation']->set_snapshot();
      $messageStack->add_session('header', MESSAGE_REVIEW_WRITE_NEEDS_LOGIN, 'caution');
      zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
    }
    
    $product_info_query = "SELECT p.products_id, p.products_model, p.products_image,
                                  p.products_price, p.products_tax_class_id, pd.products_name
                           FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                           WHERE p.products_id = :productsID
                           AND p.products_status = '1'
                           AND p.products_id = pd.products_id
                           AND pd.language_id = :languagesID";
    
    $product_info_query = $db->bindVars($product_info_query, ':productsID', $_GET['products_id'], 'integer');
    $product_info_query = $db->bindVars($product_info_query, ':languagesID', $_SESSION['languages_id'], 'integer');
    $product_info = $db->Execute($product_info_query);
    
    if (!$product_info->RecordCount()) {
      zen_redirect(zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params(array('action'))));
    }
    
    if (!$_SESSION['customer_id']) {
      $customer = '';
    } else {
      $customer_query = "SELECT customers_firstname, customers_lastname, customers_email_address
                         FROM " . TABLE_CUSTOMERS . "
                         WHERE customers_id = :customersID";
    
    
      $customer_query = $db->bindVars($customer_query, ':customersID', $_SESSION['customer_id'], 'integer');
      $customer = $db->Execute($customer_query);
    }
    
    $error = false;
    if (isset($_GET['action']) && ($_GET['action'] == 'process')) {
      $rating = zen_db_prepare_input($_POST['rating']);
      $review_text = zen_db_prepare_input($_POST['review_text']);
      $antiSpam = isset($_POST['should_be_empty']) ? zen_db_prepare_input($_POST['should_be_empty']) : '';
      $zco_notifier->notify('NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK');
      $review_name = zen_db_prepare_input($_POST['review_name']);
    
      if ((strlen($review_name) < REVIEW_NAME_MIN_LENGTH) && (!$_SESSION['customer_id'])) {
        $error = true;
        $messageStack->add('review_text', JS_REVIEW_NAME);
      }
      if (strlen($review_text) < REVIEW_TEXT_MIN_LENGTH) {
        $error = true;
        $messageStack->add('review_text', MESSAGE_REVIEW_TEXT_MIN_LENGTH);
      }
    
      if (($rating < 1) || ($rating > 5)) {
        $error = true;
        $messageStack->add('review_text', JS_REVIEW_RATING);
      }
    
      if ($error == false) {
       if ($antiSpam != '') {
        $zco_notifier->notify('NOTIFY_SPAM_DETECTED_DURING_WRITE_REVIEW');
        $messageStack->add_session('header', (defined('ERROR_WRITE_REVIEW_SPAM_DETECTED') ? ERROR_WRITE_REVIEW_SPAM_DETECTED : 'Thank you, your post has been submitted for review.'), 'success');
       } else {
    
        if (REVIEWS_APPROVAL == '1') {
          $review_status = '0';
        } else {
          $review_status = '1';
        }
     
        $messageStack->add_session('header', REVIEWS_APPROVAL == '1' ? MESSAGE_REVIEW_SUBMITTED_APPROVAL : MESSAGE_REVIEW_SUBMITTED, 'success');
    
        $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');
        
        if (!$_SESSION['customer_id']) {
          $sql = $db->bindVars($sql, ':customersID', 0, 'integer');
          $sql = $db->bindVars($sql, ':customersName', $review_name, 'string');
          
        } else {
          $sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
          $sql = $db->bindVars($sql, ':customersName', $customer->fields['customers_firstname'] . ' ' . substr( $customer->fields['customers_lastname'], 0, 1) . '.', 'string');
          
        }
    
        $sql = $db->bindVars($sql, ':rating', $rating, 'string');
    
        $db->Execute($sql);
    
        $insert_id = $db->Insert_ID();
    
        $sql = "INSERT INTO " . TABLE_REVIEWS_DESCRIPTION . " (reviews_id, languages_id, reviews_text)
                VALUES (:insertID, :languagesID, :reviewText)";
    
        $sql = $db->bindVars($sql, ':insertID', $insert_id, 'integer');
        $sql = $db->bindVars($sql, ':languagesID', $_SESSION['languages_id'], 'integer');
        $sql = $db->bindVars($sql, ':reviewText', $review_text, 'string');
    
        $db->Execute($sql);
        // send review-notification email to admin
        if (REVIEWS_APPROVAL == '1' && SEND_EXTRA_REVIEW_NOTIFICATION_EMAILS_TO_STATUS == '1' and defined('SEND_EXTRA_REVIEW_NOTIFICATION_EMAILS_TO') and SEND_EXTRA_REVIEW_NOTIFICATION_EMAILS_TO !='') {
          $email_text  = sprintf(EMAIL_PRODUCT_REVIEW_CONTENT_INTRO, $product_info->fields['products_name']) . "\n\n" ;
          $email_text .= sprintf(EMAIL_PRODUCT_REVIEW_CONTENT_DETAILS, $review_text)."\n\n";
          $email_subject = sprintf(EMAIL_REVIEW_PENDING_SUBJECT,$product_info->fields['products_name']);
          $html_msg['EMAIL_SUBJECT'] = sprintf(EMAIL_REVIEW_PENDING_SUBJECT,$product_info->fields['products_name']);
          $html_msg['EMAIL_MESSAGE_HTML'] = str_replace('\n','',sprintf(EMAIL_PRODUCT_REVIEW_CONTENT_INTRO, $product_info->fields['products_name']));
          $html_msg['EMAIL_MESSAGE_HTML'] .= '<br />';
          $html_msg['EMAIL_MESSAGE_HTML'] .= str_replace('\n','',sprintf(EMAIL_PRODUCT_REVIEW_CONTENT_DETAILS, $review_text));
          if ($customer) {
            $extra_info=email_collect_extra_info($name,$email_address, $customer->fields['customers_firstname'] . ' ' . $customer->fields['customers_lastname'] , $customer->fields['customers_email_address'] );
            $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
          }
          zen_mail('', SEND_EXTRA_REVIEW_NOTIFICATION_EMAILS_TO, $email_subject ,
          $email_text . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'reviews_extra');
        }
        // end send email
       }
        zen_redirect(zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params(array('action'))));
    
      }
    }
    
    $products_price = zen_get_products_display_price($product_info->fields['products_id']);
    
    $products_name = $product_info->fields['products_name'];
    
    if ($product_info->fields['products_model'] != '') {
      $products_model = '<br /><span class="smallText">[' . $product_info->fields['products_model'] . ']</span>';
    } else {
      $products_model = '';
    }
    
    // set image
    //  $products_image = $product_info->fields['products_image'];
    if ($product_info->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {
      $products_image = PRODUCTS_IMAGE_NO_IMAGE;
    } else {
      $products_image = $product_info->fields['products_image'];
    }
    
    $breadcrumb->add(NAVBAR_TITLE);
    
    // This should be last line of the script:
    $zco_notifier->notify('NOTIFY_HEADER_END_PRODUCT_REVIEWS_WRITE');

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 22
    Last Post: 26 Jan 2026, 06:47 AM
  2. ZX Slideshow support thread
    By balihr in forum All Other Contributions/Addons
    Replies: 766
    Last Post: 18 Oct 2025, 11:23 AM
  3. v150 Orders Status History -- Updated By [Support Thread]
    By lat9 in forum Addon Admin Tools
    Replies: 34
    Last Post: 29 Jul 2019, 07:05 PM
  4. v151 Reviews Reply addon [Support Thread]
    By mikestaps in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 17 Oct 2014, 01:29 AM
  5. Replies: 68
    Last Post: 29 Jul 2013, 06:33 PM

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