Jump to content
Sign in to follow this  
Rezolles_Net

Customer Testimonials v1.0

Recommended Posts

PS - It is also generating these errors as well:

 

# ine 377, Column 302: end tag for element "P" which is not open.

 

…"testName"><b>~Mr & Mrs Eicher</b></p><br><a href="http://www.mountainmeadowh

 

 

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

 

If this error occurred in a script section of your document, you should probably read this FAQ entry.

# Error Line 377, Column 440: document type does not allow element "A" here.

 

…sid=5c33599089aa182a3b39a3046eab2808">Full Testimony...</a><br><a href="http:

 

 

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

 

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

# Error Line 377, Column 594: document type does not allow element "A" here.

 

…sid=5c33599089aa182a3b39a3046eab2808">Additional Testimonies</a></td>

 

 

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

 

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

# Error Line 377, Column 625: end tag for "A" omitted, but its declaration does not permit this.

 

…b2808">Additional Testimonies</a></td>

 

 

* You forgot to close a tag, or

* you used something inside this tag that was not allowed, and the validator is complaining that the tag should be closed before such content can be allowed.

 

The next message, "start tag was here" points to the particular instance of the tag in question); the positional indicator points to where the validator expected you to close the tag.

# Info Line 377, Column 141: start tag was here.

 

…rops, I think I can't do without the <a href="http://www.mountainmeadowherbs.

 

 

Anybody here know if this code is incorrect ? :huh:

	$info_box_contents[] = array('align' => 'left',
							 'text'  => $testimonial . '<p class="testName"><b>~' . $random_testimonial['testimonials_title'].' '.$random_testimonial['testimonials_last_name'].'</b></p><br><a href="' . tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS, 'testimonial_id=' . $random_testimonial['testimonials_id']) .  '">' . 'Full Testimony...</a><br><a href="'. tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS, 'products_id=0', 'NONSSL'). '">'. TEXT_LINK_TESTIMONIALS . '</a>'
							 );


~Tracy
 

Share this post


Link to post
Share on other sites

Never Mind - 'twas a loose nut behind the keyboard :blush:

 

For anyone else who comes across this - it turned out I needed to go through my database and change any & symbol to   (I have this symbol in a couple of product names, and in the testimonials for those products as well). The & symbol was causing several errors - once I got that all cleaned up the errors below went away as well :thumbsup:

 

PS - It is also generating these errors as well:

 

# ine 377, Column 302: end tag for element "P" which is not open.

 

…"testName"><b>~Mr & Mrs Eicher</b></p><br><a href="http://www.mountainmeadowh

 

 

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

 

If this error occurred in a script section of your document, you should probably read this FAQ entry.

# Error Line 377, Column 440: document type does not allow element "A" here.

 

…sid=5c33599089aa182a3b39a3046eab2808">Full Testimony...</a><br><a href="http:

 

 

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

 

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

# Error Line 377, Column 594: document type does not allow element "A" here.

 

…sid=5c33599089aa182a3b39a3046eab2808">Additional Testimonies</a></td>

 

 

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

 

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

# Error Line 377, Column 625: end tag for "A" omitted, but its declaration does not permit this.

 

…b2808">Additional Testimonies</a></td>

 

 

* You forgot to close a tag, or

* you used something inside this tag that was not allowed, and the validator is complaining that the tag should be closed before such content can be allowed.

 

The next message, "start tag was here" points to the particular instance of the tag in question); the positional indicator points to where the validator expected you to close the tag.

# Info Line 377, Column 141: start tag was here.

 

…rops, I think I can't do without the <a href="http://www.mountainmeadowherbs.

 


~Tracy
 

Share this post


Link to post
Share on other sites

I have the addition to this contribution that allows a customer to submit a testimonial online. It took me a bit to get it all working - for some reason the creation of the form tag not being in php and having the link around the submit button were causing problems in FireFox - IE would submit the form correctly, but Firefox would not recognize the action=submit bit.

 

So - I've got it to the point now where both IE and Firefox will submit the form. The only difficulty I'm having at this point is that Firefox is submitting the form multiple times. Clicking the submit button causes it to be input into the database twice, and then if I click to view another testimonial it submits it two more times into the database :blink: IE only submits the form once.

 

Any ideas on what in the following code could be causing this?

(PS - I did create customer_testimonials2.php so that on successful submission they would not have the entire page of testimonials re-loaded with their "thank you for your submisison" message at the bottom. So customer_testimonials.php has a link to customer_testimonials2.php which has the form. I also have added other database fields, so some of the names may not be familiar - but that shouldn't have anything to do with why the code is causing issues in Firefox).

 

<!-- body_text //-->
<td width="100%" valign="top">
<?php echo tep_draw_form('customer_testimonial', tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS2, 'action=insert')); ?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading" colspan="2"><?php echo HEADING_TITLE; ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>

<?php

if ($HTTP_GET_VARS['action']) {
switch ($HTTP_GET_VARS['action']) {
  case 'insert':
	$testimonials_id = tep_db_prepare_input($HTTP_POST_VARS['testimonials_id']);
	$testimonials_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_title']);
	$testimonials_url = tep_db_prepare_input($HTTP_POST_VARS['testimonials_url']);
	$testimonials_url_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_url_title']);
	$testimonials_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_name']);
	$testimonials_last_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_last_name']);
	$html_text = tep_db_prepare_input($HTTP_POST_VARS['html_text']);


	if (empty($testimonials_title)) {
	  $messageStack->add('header', ERROR_TESTIMONIALS_TITLE_REQUIRED, 'warning');
	  $testimonials_error = true;
	}
	if (empty($testimonials_name)) {
	  $messageStack->add('header', ERROR_TESTIMONIALS_NAME_REQUIRED, 'warning');
	  $testimonials_error = true;
	}
	if (empty($html_text)) {
	  $messageStack->add('header', ERROR_TESTIMONIALS_DESCRIPTION_REQUIRED, 'warning');
	  $testimonials_error = true;
	}

	if (!$testimonials_error) {
	$testimonials_error = false;


	  $sql_data_array = array('testimonials_title' => $testimonials_title,
							  'testimonials_url' => $testimonials_url,
							  'testimonials_url_title' => $testimonials_url_title,
							  'testimonials_name' => $testimonials_name,
							  'testimonials_last_name' => $testimonials_last_name,
							  'testimonials_html_text' => $html_text);
	 if ($HTTP_GET_VARS['action'] == 'insert') {
	   $insert_sql_data = array('date_added' => 'now()',
								 'status' => '0');
		$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
		tep_db_perform(TABLE_CUSTOMER_TESTIMONIALS, $sql_data_array);
		$testimonials_id = tep_db_insert_id();
	  }
	  echo '<tr><td colspan="2">' . tep_draw_separator('pixel_trans.gif', '1', '10') .' </td></tr>';
	  echo '<tr><td class="main">'. TEXT_TESTIMONIALS_SUCCESSFUL .'</td><td class="main"></td></tr>';
	  $testimonials_id = '';
	   $testimonials_title = '';
	   $testimonials_url = '';
	   $testimonials_url_title = '';
	   $testimonials_name = '';
	   $testimonials_last_name = '';
	   $html_text = '';
	} else {
	   echo '<tr><td colspan="2">' . tep_draw_separator('pixel_trans.gif', '1', '10') .' </td></tr>';

	   $testimonials_id = tep_db_prepare_input($HTTP_POST_VARS['testimonials_id']);
	   $testimonials_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_title']);
	   $testimonials_url = tep_db_prepare_input($HTTP_POST_VARS['testimonials_url']);
	   $testimonials_url_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_url_title']);
	   $testimonials_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_name']);
	   $testimonials_last_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_last_name']);
	   $html_text = tep_db_prepare_input($HTTP_POST_VARS['html_text']);
	}
	break;
}
 }

?>
<tr>
	<td>
	<table align="center" width="100%" border="0" cellspacing="0" cellpadding="2">
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
	  </tr>
	  <tr>
		<td class="main" align="center"><?php echo TEXT_TESTIMONIALS_INTRO; ?></td>
	   </tr>
	  <tr>
		<td class="main" align="center">************************</td>
	   </tr>
	   <tr>
		<td><table align="center" width="100%" border="0" cellspacing="0" cellpadding="0"><tr>
		<td class="main"><?php echo TEXT_TESTIMONIALS_TITLE; ?></td>
		<td class="main"><?php echo tep_draw_input_field('testimonials_title',  $testimonials_title); ?></td>
	  </tr>
	  <tr>
		<td class="main"><?php echo TEXT_TESTIMONIALS_NAME; ?></td>
		<td class="main"><?php echo tep_draw_input_field('testimonials_name', $testimonials_name); ?></td>
	  </tr>
	  <tr>
		<td class="main"><?php echo TEXT_TESTIMONIALS_LAST_NAME; ?></td>
		<td class="main"><?php echo tep_draw_input_field('testimonials_last_name', $testimonials_last_name); ?></td>
	  </tr>
	  <tr>
		<td class="main"><?php echo TEXT_TESTIMONIALS_URL; ?></td>
		<td class="main"><?php echo tep_draw_input_field('testimonials_url', $testimonials_url); ?></td>
	  </tr>
	  <tr>
		<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
	  </tr>
	  <tr>
		<td valign="top" class="main"><?php echo TEXT_BANNERS_HTML_TEXT; ?></td>
		<td class="main"><?php echo tep_draw_textarea_field('html_text', 'soft', '130', '5', $html_text); ?></td>
	  </tr></table></td></tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
  </tr>
  <tr>
	<td><table align="center" border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td align="center" class="main"><?php echo tep_image_submit('button_submit.gif', IMAGE_BUTTON_INSERT); ?></td>
		<td align="center" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>		  
	  </tr>
	</table></td>
  </tr>
</table></form></td>
<!-- body_text_eof //-->


~Tracy
 

Share this post


Link to post
Share on other sites
Hello...

 

 

I've got a suggestion here...

 

I've tried Customer Testimonial Add-on contrib by oscUser092006 and its working perfectly.But,it would be nice if we admin were notified by email if there is a new testi submitted.So,anyone can get this done??

 

Thank you.

 

 

I second the motion!! Also, how about an anti robot image validation integration for this??

Share this post


Link to post
Share on other sites

Does anyone have a working mod_security rule to prevent these customer_testimonials attacks ?

 

customer_testimonials.php?testimonial_id=99999+union+select+1,2

 

above is a snippet of the attack urls used (whole url omitted to prevent script kiddies getting it !!!)

 

I am new to mod_sec rules but i think something along the lines of

 

# OSC CUSTOMER TESTIMONIALS
SecFilterSelective THE_REQUEST "customer_testimonials.php?testimonial_id=99999+union+select"

 

but i dont know how to use a variable in place of the testimonial_id of 99999 ???

Share this post


Link to post
Share on other sites
Does anyone have a working mod_security rule to prevent these customer_testimonials attacks ?

 

customer_testimonials.php?testimonial_id=99999+union+select+1,2

 

above is a snippet of the attack urls used (whole url omitted to prevent script kiddies getting it !!!)

 

I am new to mod_sec rules but i think something along the lines of

 

# OSC CUSTOMER TESTIMONIALS
SecFilterSelective THE_REQUEST "customer_testimonials.php?testimonial_id=99999+union+select"

 

but i dont know how to use a variable in place of the testimonial_id of 99999 ???

 

 

have you tried Security Pro contrib?

Share this post


Link to post
Share on other sites

I am having an issue with customer testimonials 3.x when a customer submits a testimonial it goes into the database just fine but the confirmation page is blank. Any Ideas?

The store is running STS 2.01 if that matters at all. Any thoughts would be appreciated.

Share this post


Link to post
Share on other sites

I have a problem related to STS I think, better say, some changes I should make for store running with STS 4.58:

When customer submits testimonial he got the error:

Fatal error: Call to a member function size() on a non-object in /home/myhostusername/domains/mydomain.com/public_html/includes/classes/sts.php on line 186

 

Otherwise testimonials work fine.

 

Interesting, that customer's testimonial saved in database fine, cause administrator can see it in a testimonial manager.

 

I am not sue probably some changes should be done in includes\modules\sts_inc\sts_column_left.php page?

 

Thanks for any help!

Edited by AlwaysNewbie

Computers777dotcom

Share this post


Link to post
Share on other sites

Hi.

 

I need some help with this as it is not to clear to me.

 

The instructions states that.

FILE: catalog/includes/languages/english.php

ADD

 

define('BOX_HEADING_CUSTOMER_TESTIMONIALS', 'Testimonials');

define('BOX_INFORMATION_CUSTOMER_TESTIMONIALS', 'Testimonials');

define('TABLE_HEADING_TESTIMONIALS_ID', 'ID');

define('TABLE_HEADING_TESTIMONIALS_NAME', 'Name');

define('TABLE_HEADING_TESTIMONIALS_DESCRIPTION', 'Testimonial');

define('TEXT_READ_MORE', 'Read More ');

define('TEXT_TESTIM_BY', 'By:');

define('IMAGE_BUTTON_INSERT', 'Insert:');

 

 

My code looks like this below. so where would I insert the above code?

 

 

 

<?php
/*
 $Id: english.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2007 osCommerce

 Released under the GNU General Public License
*/

// look in your $PATH_LOCALE/locale directory for available locales..
// on RedHat6.0 I used 'en_US'
// on FreeBSD 4.0 I use 'en_US.ISO_8859-1'
// this may not work under win32 environments..
setlocale(LC_TIME, 'en_US.ISO_8859-1');
define('DATE_FORMAT_SHORT', '%m/%d/%Y');  // this is used for strftime()
define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()
define('DATE_FORMAT', 'm/d/Y'); // this is used for date()
define('PHP_DATE_TIME_FORMAT', 'm/d/Y H:i:s'); // this is used for date()
define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

////
// Return date in raw format
// $date should be in format mm/dd/yyyy
// raw date is in format YYYYMMDD, or DDMMYYYY
function tep_date_raw($date, $reverse = false) {
 if ($reverse) {
return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);
 } else {
return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2);
 }
}

// Global entries for the <html> tag
define('HTML_PARAMS','dir="ltr" lang="en"');

// charset for web pages and emails
define('CHARSET', 'iso-8859-1');

// page title
define('TITLE', 'osCommerce Online Merchant Administration Tool');

// header text in includes/header.php
define('HEADER_TITLE_TOP', 'Administration');
define('HEADER_TITLE_SUPPORT_SITE', 'Support Site');
define('HEADER_TITLE_ONLINE_CATALOG', 'Online Catalog');
define('HEADER_TITLE_ADMINISTRATION', 'Administration');

// text for gender
define('MALE', 'Male');
define('FEMALE', 'Female');

// text for date of birth example
define('DOB_FORMAT_STRING', 'mm/dd/yyyy');

// configuration box text in includes/boxes/configuration.php
define('BOX_HEADING_CONFIGURATION', 'Configuration');
define('BOX_CONFIGURATION_MYSTORE', 'My Store');
define('BOX_CONFIGURATION_LOGGING', 'Logging');
define('BOX_CONFIGURATION_CACHE', 'Cache');
define('BOX_CONFIGURATION_ADMINISTRATORS', 'Administrators');

// modules box text in includes/boxes/modules.php
define('BOX_HEADING_MODULES', 'Modules');
define('BOX_MODULES_PAYMENT', 'Payment');
define('BOX_MODULES_SHIPPING', 'Shipping');
define('BOX_MODULES_ORDER_TOTAL', 'Order Total');

// categories box text in includes/boxes/catalog.php
define('BOX_HEADING_CATALOG', 'Catalog');
define('BOX_CATALOG_CATEGORIES_PRODUCTS', 'Categories/Products');
define('BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES', 'Products Attributes');
define('BOX_CATALOG_MANUFACTURERS', 'Manufacturers');
define('BOX_CATALOG_REVIEWS', 'Reviews');
define('BOX_CATALOG_SPECIALS', 'Specials');
define('BOX_CATALOG_PRODUCTS_EXPECTED', 'Products Expected');

// customers box text in includes/boxes/customers.php
define('BOX_HEADING_CUSTOMERS', 'Customers');
define('BOX_CUSTOMERS_CUSTOMERS', 'Customers');
define('BOX_CUSTOMERS_ORDERS', 'Orders');

// taxes box text in includes/boxes/taxes.php
define('BOX_HEADING_LOCATION_AND_TAXES', 'Locations / Taxes');
define('BOX_TAXES_COUNTRIES', 'Countries');
define('BOX_TAXES_ZONES', 'Zones');
define('BOX_TAXES_GEO_ZONES', 'Tax Zones');
define('BOX_TAXES_TAX_CLASSES', 'Tax Classes');
define('BOX_TAXES_TAX_RATES', 'Tax Rates');

// reports box text in includes/boxes/reports.php
define('BOX_HEADING_REPORTS', 'Reports');
define('BOX_REPORTS_PRODUCTS_VIEWED', 'Products Viewed');
define('BOX_REPORTS_PRODUCTS_PURCHASED', 'Products Purchased');
define('BOX_REPORTS_ORDERS_TOTAL', 'Customer Orders-Total');
define('BOX_REPORTS_MONTHLY_SALES', 'Monthly Sales/Tax');

// tools text in includes/boxes/tools.php
define('BOX_HEADING_TOOLS', 'Tools');
define('BOX_TOOLS_BACKUP', 'Database Backup');
define('BOX_TOOLS_BANNER_MANAGER', 'Banner Manager');
define('BOX_TOOLS_CACHE', 'Cache Control');
define('BOX_TOOLS_DEFINE_LANGUAGE', 'Define Languages');
define('BOX_TOOLS_FILE_MANAGER', 'File Manager');
define('BOX_TOOLS_MAIL', 'Send Email');
define('BOX_TOOLS_NEWSLETTER_MANAGER', 'Newsletter Manager');
define('BOX_TOOLS_SERVER_INFO', 'Server Info');
define('BOX_TOOLS_WHOS_ONLINE', 'Who\'s Online');

// localizaion box text in includes/boxes/localization.php
define('BOX_HEADING_LOCALIZATION', 'Localization');
define('BOX_LOCALIZATION_CURRENCIES', 'Currencies');
define('BOX_LOCALIZATION_LANGUAGES', 'Languages');
define('BOX_LOCALIZATION_ORDERS_STATUS', 'Orders Status');

// javascript messages
define('JS_ERROR', 'Errors have occured during the process of your form!\nPlease make the following corrections:\n\n');

define('JS_OPTIONS_VALUE_PRICE', '* The new product atribute needs a price value\n');
define('JS_OPTIONS_VALUE_PRICE_PREFIX', '* The new product atribute needs a price prefix\n');

define('JS_PRODUCTS_NAME', '* The new product needs a name\n');
define('JS_PRODUCTS_DESCRIPTION', '* The new product needs a description\n');
define('JS_PRODUCTS_PRICE', '* The new product needs a price value\n');
define('JS_PRODUCTS_WEIGHT', '* The new product needs a weight value\n');
define('JS_PRODUCTS_QUANTITY', '* The new product needs a quantity value\n');
define('JS_PRODUCTS_MODEL', '* The new product needs a model value\n');
define('JS_PRODUCTS_IMAGE', '* The new product needs an image value\n');

define('JS_SPECIALS_PRODUCTS_PRICE', '* A new price for this product needs to be set\n');

define('JS_GENDER', '* The \'Gender\' value must be chosen.\n');
define('JS_FIRST_NAME', '* The \'First Name\' entry must have at least ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' characters.\n');
define('JS_LAST_NAME', '* The \'Last Name\' entry must have at least ' . ENTRY_LAST_NAME_MIN_LENGTH . ' characters.\n');
define('JS_DOB', '* The \'Date of Birth\' entry must be in the format: xx/xx/xxxx (month/date/year).\n');
define('JS_EMAIL_ADDRESS', '* The \'E-Mail Address\' entry must have at least ' . ENTRY_EMAIL_ADDRESS_MIN_LENGTH . ' characters.\n');
define('JS_ADDRESS', '* The \'Street Address\' entry must have at least ' . ENTRY_STREET_ADDRESS_MIN_LENGTH . ' characters.\n');
define('JS_POST_CODE', '* The \'Post Code\' entry must have at least ' . ENTRY_POSTCODE_MIN_LENGTH . ' characters.\n');
define('JS_CITY', '* The \'City\' entry must have at least ' . ENTRY_CITY_MIN_LENGTH . ' characters.\n');
define('JS_STATE', '* The \'State\' entry is must be selected.\n');
define('JS_STATE_SELECT', '-- Select Above --');
define('JS_ZONE', '* The \'State\' entry must be selected from the list for this country.');
define('JS_COUNTRY', '* The \'Country\' value must be chosen.\n');
define('JS_TELEPHONE', '* The \'Telephone Number\' entry must have at least ' . ENTRY_TELEPHONE_MIN_LENGTH . ' characters.\n');
define('JS_PASSWORD', '* The \'Password\' amd \'Confirmation\' entries must match amd have at least ' . ENTRY_PASSWORD_MIN_LENGTH . ' characters.\n');

define('JS_ORDER_DOES_NOT_EXIST', 'Order Number %s does not exist!');

define('CATEGORY_PERSONAL', 'Personal');
define('CATEGORY_ADDRESS', 'Address');
define('CATEGORY_CONTACT', 'Contact');
define('CATEGORY_COMPANY', 'Company');
define('CATEGORY_OPTIONS', 'Options');

define('ENTRY_GENDER', 'Gender:');
define('ENTRY_GENDER_ERROR', ' <span class="errorText">required</span>');
define('ENTRY_FIRST_NAME', 'First Name:');
define('ENTRY_FIRST_NAME_ERROR', ' <span class="errorText">min ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' chars</span>');
define('ENTRY_LAST_NAME', 'Last Name:');
define('ENTRY_LAST_NAME_ERROR', ' <span class="errorText">min ' . ENTRY_LAST_NAME_MIN_LENGTH . ' chars</span>');
define('ENTRY_DATE_OF_BIRTH', 'Date of Birth:');
define('ENTRY_DATE_OF_BIRTH_ERROR', ' <span class="errorText">(eg. 05/21/1970)</span>');
define('ENTRY_EMAIL_ADDRESS', 'E-Mail Address:');
define('ENTRY_EMAIL_ADDRESS_ERROR', ' <span class="errorText">min ' . ENTRY_EMAIL_ADDRESS_MIN_LENGTH . ' chars</span>');
define('ENTRY_EMAIL_ADDRESS_CHECK_ERROR', ' <span class="errorText">The email address doesn\'t appear to be valid!</span>');
define('ENTRY_EMAIL_ADDRESS_ERROR_EXISTS', ' <span class="errorText">This email address already exists!</span>');
define('ENTRY_COMPANY', 'Company name:');
define('ENTRY_COMPANY_ERROR', '');
define('ENTRY_STREET_ADDRESS', 'Street Address:');
define('ENTRY_STREET_ADDRESS_ERROR', ' <span class="errorText">min ' . ENTRY_STREET_ADDRESS_MIN_LENGTH . ' chars</span>');
define('ENTRY_SUBURB', 'Suburb:');
define('ENTRY_SUBURB_ERROR', '');
define('ENTRY_POST_CODE', 'Post Code:');
define('ENTRY_POST_CODE_ERROR', ' <span class="errorText">min ' . ENTRY_POSTCODE_MIN_LENGTH . ' chars</span>');
define('ENTRY_CITY', 'City:');
define('ENTRY_CITY_ERROR', ' <span class="errorText">min ' . ENTRY_CITY_MIN_LENGTH . ' chars</span>');
define('ENTRY_STATE', 'State:');
define('ENTRY_STATE_ERROR', ' <span class="errorText">required</span>');
define('ENTRY_COUNTRY', 'Country:');
define('ENTRY_COUNTRY_ERROR', '');
define('ENTRY_TELEPHONE_NUMBER', 'Telephone Number:');
define('ENTRY_TELEPHONE_NUMBER_ERROR', ' <span class="errorText">min ' . ENTRY_TELEPHONE_MIN_LENGTH . ' chars</span>');
define('ENTRY_FAX_NUMBER', 'Fax Number:');
define('ENTRY_FAX_NUMBER_ERROR', '');
define('ENTRY_NEWSLETTER', 'Newsletter:');
define('ENTRY_NEWSLETTER_YES', 'Subscribed');
define('ENTRY_NEWSLETTER_NO', 'Unsubscribed');
define('ENTRY_NEWSLETTER_ERROR', '');

// images
define('IMAGE_ANI_SEND_EMAIL', 'Sending E-Mail');
define('IMAGE_BACK', 'Back');
define('IMAGE_BACKUP', 'Backup');
define('IMAGE_CANCEL', 'Cancel');
define('IMAGE_CONFIRM', 'Confirm');
define('IMAGE_COPY', 'Copy');
define('IMAGE_COPY_TO', 'Copy To');
define('IMAGE_DETAILS', 'Details');
define('IMAGE_DELETE', 'Delete');
define('IMAGE_EDIT', 'Edit');
define('IMAGE_EMAIL', 'Email');
define('IMAGE_FILE_MANAGER', 'File Manager');
define('IMAGE_ICON_STATUS_GREEN', 'Active');
define('IMAGE_ICON_STATUS_GREEN_LIGHT', 'Set Active');
define('IMAGE_ICON_STATUS_RED', 'Inactive');
define('IMAGE_ICON_STATUS_RED_LIGHT', 'Set Inactive');
define('IMAGE_ICON_INFO', 'Info');
define('IMAGE_INSERT', 'Insert');
define('IMAGE_LOCK', 'Lock');
define('IMAGE_MODULE_INSTALL', 'Install Module');
define('IMAGE_MODULE_REMOVE', 'Remove Module');
define('IMAGE_MOVE', 'Move');
define('IMAGE_NEW_BANNER', 'New Banner');
define('IMAGE_NEW_CATEGORY', 'New Category');
define('IMAGE_NEW_COUNTRY', 'New Country');
define('IMAGE_NEW_CURRENCY', 'New Currency');
define('IMAGE_NEW_FILE', 'New File');
define('IMAGE_NEW_FOLDER', 'New Folder');
define('IMAGE_NEW_LANGUAGE', 'New Language');
define('IMAGE_NEW_NEWSLETTER', 'New Newsletter');
define('IMAGE_NEW_PRODUCT', 'New Product');
define('IMAGE_NEW_TAX_CLASS', 'New Tax Class');
define('IMAGE_NEW_TAX_RATE', 'New Tax Rate');
define('IMAGE_NEW_TAX_ZONE', 'New Tax Zone');
define('IMAGE_NEW_ZONE', 'New Zone');
define('IMAGE_ORDERS', 'Orders');
define('IMAGE_ORDERS_INVOICE', 'Invoice');
define('IMAGE_ORDERS_PACKINGSLIP', 'Packing Slip');
define('IMAGE_PREVIEW', 'Preview');
define('IMAGE_RESTORE', 'Restore');
define('IMAGE_RESET', 'Reset');
define('IMAGE_SAVE', 'Save');
define('IMAGE_SEARCH', 'Search');
define('IMAGE_SELECT', 'Select');
define('IMAGE_SEND', 'Send');
define('IMAGE_SEND_EMAIL', 'Send Email');
define('IMAGE_UNLOCK', 'Unlock');
define('IMAGE_UPDATE', 'Update');
define('IMAGE_UPDATE_CURRENCIES', 'Update Exchange Rate');
define('IMAGE_UPLOAD', 'Upload');

define('ICON_CROSS', 'False');
define('ICON_CURRENT_FOLDER', 'Current Folder');
define('ICON_DELETE', 'Delete');
define('ICON_ERROR', 'Error');
define('ICON_FILE', 'File');
define('ICON_FILE_DOWNLOAD', 'Download');
define('ICON_FOLDER', 'Folder');
define('ICON_LOCKED', 'Locked');
define('ICON_PREVIOUS_LEVEL', 'Previous Level');
define('ICON_PREVIEW', 'Preview');
define('ICON_STATISTICS', 'Statistics');
define('ICON_SUCCESS', 'Success');
define('ICON_TICK', 'True');
define('ICON_UNLOCKED', 'Unlocked');
define('ICON_WARNING', 'Warning');

// constants for use in tep_prev_next_display function
define('TEXT_RESULT_PAGE', 'Page %s of %d');
define('TEXT_DISPLAY_NUMBER_OF_BANNERS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> banners)');
define('TEXT_DISPLAY_NUMBER_OF_COUNTRIES', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> countries)');
define('TEXT_DISPLAY_NUMBER_OF_CUSTOMERS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> customers)');
define('TEXT_DISPLAY_NUMBER_OF_CURRENCIES', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> currencies)');
define('TEXT_DISPLAY_NUMBER_OF_LANGUAGES', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> languages)');
define('TEXT_DISPLAY_NUMBER_OF_MANUFACTURERS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> manufacturers)');
define('TEXT_DISPLAY_NUMBER_OF_NEWSLETTERS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> newsletters)');
define('TEXT_DISPLAY_NUMBER_OF_ORDERS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> orders)');
define('TEXT_DISPLAY_NUMBER_OF_ORDERS_STATUS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> orders status)');
define('TEXT_DISPLAY_NUMBER_OF_PRODUCTS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> products)');
define('TEXT_DISPLAY_NUMBER_OF_PRODUCTS_EXPECTED', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> products expected)');
define('TEXT_DISPLAY_NUMBER_OF_REVIEWS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> product reviews)');
define('TEXT_DISPLAY_NUMBER_OF_SPECIALS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> products on special)');
define('TEXT_DISPLAY_NUMBER_OF_TAX_CLASSES', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> tax classes)');
define('TEXT_DISPLAY_NUMBER_OF_TAX_ZONES', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> tax zones)');
define('TEXT_DISPLAY_NUMBER_OF_TAX_RATES', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> tax rates)');
define('TEXT_DISPLAY_NUMBER_OF_ZONES', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> zones)');

define('PREVNEXT_BUTTON_PREV', '<<');
define('PREVNEXT_BUTTON_NEXT', '>>');

define('TEXT_DEFAULT', 'default');
define('TEXT_SET_DEFAULT', 'Set as default');
define('TEXT_FIELD_REQUIRED', ' <span class="fieldRequired">* Required</span>');

define('ERROR_NO_DEFAULT_CURRENCY_DEFINED', 'Error: There is currently no default currency set. Please set one at: Administration Tool->Localization->Currencies');

define('TEXT_CACHE_CATEGORIES', 'Categories Box');
define('TEXT_CACHE_MANUFACTURERS', 'Manufacturers Box');
define('TEXT_CACHE_ALSO_PURCHASED', 'Also Purchased Module');

define('TEXT_NONE', '--none--');
define('TEXT_TOP', 'Top');

define('ERROR_DESTINATION_DOES_NOT_EXIST', 'Error: Destination does not exist.');
define('ERROR_DESTINATION_NOT_WRITEABLE', 'Error: Destination not writeable.');
define('ERROR_FILE_NOT_SAVED', 'Error: File upload not saved.');
define('ERROR_FILETYPE_NOT_ALLOWED', 'Error: File upload type not allowed.');
define('SUCCESS_FILE_SAVED_SUCCESSFULLY', 'Success: File upload saved successfully.');
define('WARNING_NO_FILE_UPLOADED', 'Warning: No file uploaded.');
define('WARNING_FILE_UPLOADS_DISABLED', 'Warning: File uploads are disabled in the php.ini configuration file.');
?>

Share this post


Link to post
Share on other sites

i iinstalled the latest version but when i am trying to get in to the admin page i get this error :

1146 - Table 'oscommerce_.TABLE_TESTIMONIALS' doesn't exist

 

select count(*) as total from TABLE_TESTIMONIALS

 

[TEP STOP]

 

 

i have already run the sql :

CREATE TABLE `customer_testimonials` (

`testimonials_title` varchar(64) NOT NULL default '',

`testimonials_id` int(5) NOT NULL auto_increment,

`testimonials_html_text` longtext NOT NULL,

`testimonials_name` varchar(50) NOT NULL default '',

`testimonials_email` varchar(70) NOT NULL default '',

`date_added` varchar(50) NOT NULL default '',

`status` tinyint(1) NOT NULL default '1',

PRIMARY KEY (`testimonials_id`)

) TYPE=MyISAM;


I am Maintaining :

Product_Short_Description (i added it on specials.php and in shopping_cart.php)

City Shipping Rates With Admin (fixed the error that was giving wrong total shipping charges)

I had Created :

UTF bug fix on standard reviews system (admin & block)

Corrupted character on mysql with utf-8

Share this post


Link to post
Share on other sites

HI,

i´ve just installed your mod, and i´m having this error at the website frontend:

0 -

select * FROM TABLE_CUSTOMER_TESTIMONIALS WHERE status = 1 ORDER BY rand() LIMIT 1

[TEP STOP]

Any ideias ?

 

Regards,

Share this post


Link to post
Share on other sites
hi. I already install the customer testimonial v.3.2. My problem is when you already input the testimonial form and you submit it, it count as 1 testimonial. But when you refresh it, it will recreate the same testimonial. Is anyone can help me to solve this problem? or maybe to remove the input box, so it will not recreate the testimonial? Any solution to this, it is very helpful. Thanks for helping.

 

I was hope someone could help me with an error or bug that I am having.

 

I have read all six pages of this support forum and only noticed this bug mentioned once, with no reply or answer.

I find it had to believe they we are the only 2 experiencing this.

 

I've tried for many hours now to correct this but have had no luck. I decided to see if I could find some help.

 

Here is the problem as clearly described as I can:

 

In admin, if I select a testimonial and then click the Edit button, I am brought to an Edit page with an Update button at the bottom.

If I make no changes here, pressing Update returns me to the default page listing all testimonials.

If I make changes that don't trigger any error messages, pressing Update returns me to the default page listing all testimonials.

*Now here's the messed up part*

If I make a change that I know will trigger an error message, pressing Update refreshes the page, no messagestack is displayed, and the Update button is replaced with an Insert button.

If I correct the input that triggered the error messages, pressing Insert causes a new testimonial to be added to the database and returns me to the default page where I see the newly, yet unnecessarily, added testimonial at the top of the list.

 

Has anyone else encountered this bug?

 

Does anyone have a solution to this bug?

 

I find it had to believe that its made it this many versions and no one besides the other person and myself have had this bug. Like I mentioned before I have tried for hours to hunt down the cause of this bug with out any success.

 

Please Help!

Share this post


Link to post
Share on other sites

Anyone find a solution to the customer testimonials pushing out left and right. Its fairly easy to adjust most pages to fit the 770 width but I am having trouble with this one (5 hours later, lol).

 

Anyone know of where I can start to fix this?

 

Carry

:blush:

Share this post


Link to post
Share on other sites

Hello! I'm trying to integrate reCaptcha with testimonials on the customer_testimonials_write.php page (I've already done it on contact us and create account and other pages...). This is the code I'm using; however, I can't get reCaptcha to validate that I put in the correct words (and I am typing the correct words) - it always gives "incorrect code entered" - below is the code I'm using on this page to make this work thusfar... any thoughts? My initial thoughts are that the "insert" "case" is messing it up somehow... my code is commented...

 

 <?php
 /*
  $Id: customer_testimonials_write.php,v 2 10/17/2007 Exp $
  Released under the GNU General Public License
  Contributed by http://www.nxlcart.com
*/


  require('includes/application_top.php');

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CUSTOMER_TESTIMONIALS);

// start modification for reCaptcha
  require_once('includes/classes/recaptchalib.php');
  require_once('includes/recaptchakeys.php');
// end modification for reCaptcha

  $location = ' » <a href="' . tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS_WRITE, '', 'NONSSL') . '" class="headerNavigation">' . NAVBAR_TITLE . '</a>';
  $breadcrumb->add(NAVBAR_TITLE2, tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS_WRITE));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
  <tr>
 <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
 </table></td>
<!-- body_text //-->
 <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
   <tr>
	 <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
	   <tr>
		 <td class="pageHeading" colspan="2"><?php echo TEXT_TESTIMONIALS_WRITE; ?></td>
	   </tr>
	 </table></td>
   </tr>
   <tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
   </tr>
<?php

if ($HTTP_GET_VARS['action']) {
 switch ($HTTP_GET_VARS['action']) {
   case 'insert':
	 $testimonials_id = tep_db_prepare_input($HTTP_POST_VARS['testimonials_id']);
	 $testimonials_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_title']);
	 $testimonials_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_name']);
	 $testimonials_email = tep_db_prepare_input($HTTP_POST_VARS['testimonials_email']);
	 $testimonials_location = tep_db_prepare_input($HTTP_POST_VARS['testimonials_location']);
	 $html_text = tep_db_prepare_input($HTTP_POST_VARS['html_text']);

	 $testimonials_error = false;
	 $messageStack = ERROR_HEADER;
	 if (empty($testimonials_title)) {
	   $messageStack .= '['.ERROR_TESTIMONIALS_TITLE_REQUIRED.']';
	   $testimonials_error = true;
	 }
	 if (empty($testimonials_name)) {
	   $messageStack .= '['.ERROR_TESTIMONIALS_NAME_REQUIRED.']';
	   $testimonials_error = true;
	 }
	  if (empty($testimonials_email)) {
	   $messageStack .= '['.ERROR_TESTIMONIALS_EMAIL_REQUIRED.']';
	   $testimonials_error = true;
	 }
	 if (empty($html_text)) {
	   $messageStack.= '['.ERROR_TESTIMONIALS_DESCRIPTION_REQUIRED.']';
	   $testimonials_error = true;
	 }
// start modification for reCaptcha
	 if ($HTTP_GET_VARS['action'] == 'insert') {
	   // the response from reCAPTCHA
	   $resp = null;

	   // was there a reCAPTCHA response?
	   $resp = recaptcha_check_answer ($privatekey,
									   $_SERVER["REMOTE_ADDR"],
									   $_POST["recaptcha_challenge_field"],
									   $_POST["recaptcha_response_field"]);
	   if (!$resp->is_valid) {
		 $messageStack.='['.ENTRY_SECURITY_CHECK_ERROR.$resp->error.']';
		 $testimonials_error = true;
	   }
	 }
// end modification for reCaptcha

	 if (!$testimonials_error) {
	   $sql_data_array = array('testimonials_title' => $testimonials_title,						 
							   'testimonials_location' => $testimonials_location,
							   'testimonials_name' => $testimonials_name,
							   'testimonials_email' => $testimonials_email,
							   'testimonials_html_text' => $html_text);
	  // if ($HTTP_GET_VARS['action'] == 'insert') {
		// $insert_sql_data = array('date_added' => 'now()',
								  // 'status' => '0');
		 // $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
		 // tep_db_perform(TABLE_CUSTOMER_TESTIMONIALS, $sql_data_array);
		 // $testimonials_id = tep_db_insert_id();
	   // }
	  if ($HTTP_GET_VARS['action'] == 'insert') {
		$insert_sql_data = array('date_added' => 'now()',
								  'status' => '0');
		 $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
		 tep_db_perform(TABLE_CUSTOMER_TESTIMONIALS, $sql_data_array);
		 $testimonials_id = tep_db_insert_id();
		 // email notification added by maestro
		 $email_text = TESTIMONIAL_NOTIFICATION_TEXT . $testimonials_name . "\n" .
					   TESTIMONIAL_NOTIFICATION_TEXT_2 . "\n\n" .
					   TESTIMONIAL_NOTIFICATION_TITLE . $testimonials_title . "\n\n" .
					   TESTIMONIAL_NOTIFICATION_HTML_TEXT . "\n" .
					   $html_text . "\n\n" .
					   $testimonials_url . "\n\n" .
					   TESTIMONIAL_NOTIFICATION_APPROVE;
		 tep_mail('', 'email@address.com', TESTIMONIAL_NOTIFICATION_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
	   }
	   echo '<tr><td colspan="2">' . tep_draw_separator('pixel_trans.gif', '1', '10') .' </td></tr>';
	   echo '<tr><td class="main">'. TEXT_TESTIMONIALS_SUCCESSFUL .'</td><td class="main"><a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a></td></tr>';
	   $testimonials_id = '';
		$testimonials_title = '';
		$testimonials_location = '';
		$testimonials_name = '';
		$testimonials_email = '';
		$html_text = '';
	 } else {
		echo '<tr><td colspan="2">' . tep_draw_separator('pixel_trans.gif', '1', '10') .' </td></tr>';
		echo '<tr><td class="main">'. $messageStack .'</td><td class="main"></td></tr>';

		$testimonials_id = tep_db_prepare_input($HTTP_POST_VARS['testimonials_id']);
		$testimonials_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_title']);		  
		$testimonials_location = tep_db_prepare_input($HTTP_POST_VARS['testimonials_location']);
		$testimonials_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_name']);
		$testimonials_email = tep_db_prepare_input($HTTP_POST_VARS['testimonials_email']);
		$html_text = tep_db_prepare_input($HTTP_POST_VARS['html_text']);
	 }
	 break;
 }
  }

?>

<?php
if (tep_session_is_registered('customer_id')) {
 $account_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
 $account = tep_db_fetch_array($account_query);

 $testimonials_name = $account['customers_firstname'] . ' ' . $account['customers_lastname'];
 $testimonials_email = $account['customers_email_address'];
  }
?>

<tr><form name="customer_testimonial" method="post" action="<?php echo tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS_WRITE, 'action=insert', 'NONSSL'); ?>">
	 <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
	   <tr>
		 <?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
	   </tr>
	   <tr>
		 <td class="main"><?php echo TEXT_TESTIMONIALS_INTRO; ?></td>
	   </tr>
	   <tr>
		 <td><table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
		   <tr>
			 <td class="infoBox"><table width="100%" border="0" cellspacing="0" cellpadding="2" class="infoBoxContents">
		   <tr>
			 <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
		   <tr>
			 <td class="main"><?php echo TEXT_TESTIMONIALS_TITLE; ?>

							  <?php echo tep_draw_input_field('testimonials_title',  $testimonials_title, '', true); ?><span class="inputRequirement">*</span></td>
		   </tr>
		   <tr>
			 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
		   </tr>
		   <tr>
			 <td class="main"><?php echo TEXT_TESTIMONIALS_NAME; ?>

							  <?php echo tep_draw_input_field('testimonials_name', $testimonials_name, '', true); ?><span class="inputRequirement">*</span></td>
		   <tr>
			 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
		   </tr>
		   <tr>
			 <td class="main"><?php echo TEXT_TESTIMONIALS_EMAIL; ?>

							  <?php echo tep_draw_input_field('testimonials_email'); ?> <span class="inputRequirement">*</span></td> 
		   </tr>
		   <tr>
			 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
		   </tr>
		   <tr>
			 <td class="main"><?php echo TEXT_TESTIMONIALS_LOCATION; ?>

							  <?php echo tep_draw_input_field('testimonials_location', $testimonials_location); ?></td>
			  </tr>
		   <tr>
			 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
		   </tr>
		   <tr>
			 <td valign="top" class="main"><?php echo TEXT_BANNERS_HTML_TEXT; ?>

										   <?php echo tep_draw_textarea_field('html_text', 'soft', '130', '10', $html_text); ?></td>
		   </tr>
		 </table></td>
	   </tr>
		 </table></td>
	   </tr>
		   <tr>
			 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
		   </tr>
<!-- start modification for reCaptcha -->
		   <tr>
			 <td class="main"><?php echo ENTRY_SECURITY_CHECK; ?></td>
		   </tr>
		   <tr>
			 <script>
			 var RecaptchaOptions = {
				theme : 'white',
				tabindex : 3
			 };
			 </script>				  
			 <td class="main"><?php echo recaptcha_get_html($publickey); ?></td>
		   </tr>
<!-- end modification for reCaptcha -->
		   <tr>
			 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
		   </tr>
		   <tr>
			 <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
			   <tr class="infoBoxContents">
				 <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
				   <tr>
					 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
					 <td class="main" align="left" valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
					 <td class="main" align="right" valign="middle"><?php echo tep_image_submit('button_submit.gif', IMAGE_BUTTON_INSERT). '<a href="' . tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS_WRITE, '', 'NONSSL'); ?></td>
					 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				   </tr>
				 </table></td>
			   </tr>
			 </table></td>
		   </tr>
	 </table></td>
   </form></tr>
  </tr>
</table>
</td>
  </tr>
</table>
<!-- body_text_eof //-->
 <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
 </table></td>
  </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->


</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Scott

Edited by olsonsp4c

Share this post


Link to post
Share on other sites

I've added an addon to add reCaptcha support for osC forms and could use help on integration into the Customer Testimonials Addon.

 

You can download it here: http://addons.oscommerce.com/info/6306

 

I've included a section on a non-working version for this addon that you could help me troubleshoot that is essentially the same as I've posted above but tells you how to add it to your store... please backup before you install it as it is currently NON-functional for the customer_testimonials_write.php page...

 

thanks!

 

Scott

Share this post


Link to post
Share on other sites
Anyone find a solution to the customer testimonials pushing out left and right. Its fairly easy to adjust most pages to fit the 770 width but I am having trouble with this one (5 hours later, lol).

 

Anyone know of where I can start to fix this?

 

Carry

:blush:

 

I remember having an issue with this at some point - towards the bottom there is probably a missing </tr> or an extra one perhaps... look at the code I posted and compare it to your file...

 

Scott

Share this post


Link to post
Share on other sites
I was hope someone could help me with an error or bug that I am having.

 

I have read all six pages of this support forum and only noticed this bug mentioned once, with no reply or answer.

I find it had to believe they we are the only 2 experiencing this.

 

I've tried for many hours now to correct this but have had no luck. I decided to see if I could find some help.

 

Here is the problem as clearly described as I can:

 

In admin, if I select a testimonial and then click the Edit button, I am brought to an Edit page with an Update button at the bottom.

If I make no changes here, pressing Update returns me to the default page listing all testimonials.

If I make changes that don't trigger any error messages, pressing Update returns me to the default page listing all testimonials.

*Now here's the messed up part*

If I make a change that I know will trigger an error message, pressing Update refreshes the page, no messagestack is displayed, and the Update button is replaced with an Insert button.

If I correct the input that triggered the error messages, pressing Insert causes a new testimonial to be added to the database and returns me to the default page where I see the newly, yet unnecessarily, added testimonial at the top of the list.

 

Has anyone else encountered this bug?

 

Does anyone have a solution to this bug?

 

I find it had to believe that its made it this many versions and no one besides the other person and myself have had this bug. Like I mentioned before I have tried for hours to hunt down the cause of this bug with out any success.

 

Please Help!

 

I looked at it, the issue is that it is losing the tID for some reason and switching from the 'update' case to the 'insert' case... I'm not sure how to fix it at this point....

 

Scott

Share this post


Link to post
Share on other sites

Everybody, I rewrote this addon and fixed all known issues that I could find including the admin update issue mentioned above...

 

Download it here: http://addons.oscommerce.com/info/5477

 

Here's the skinny:

 

Since v3.2

----------

* Modified the sql to do away with url and instead use email address

* Modified the catalog infobox formatting a little bit

* Modified the layout of the catalog files and functionality

* Added a new button to the catalog and updated all other buttons added by this addon

* Altogether rewrote error message logic to be consistent with osC standards in the catalog

* Fixed the success page bug so that it redirects to the success page properly

* Fixed the module email address bug, now "mailto:" is automatically added to email addresses

* Fixed the update issue in the Admin where it changed from Update to Insert

* Fixed the update issue in the Admin where it would not append updated info to the database properly

* Added a bunch of language defines that weren't there

* Integrated the email message mod into the base code

* Removed ALOT of superflous code that had crept into the addon

* Many, many, many other small things and some larger ones :)

 

It is quite ready for multilingual support; however, you all will need to do the translation work for me :)

 

Scott

Share this post


Link to post
Share on other sites

I tried installing this, however it does not work for me.

The following errors were received.

 

Note: I have checked all the tables and they do exist in phpMyAdmin after the SQL file was ran.

 

I Used the column_left.php ,If I remove the Colum_left php the error goes away.

 

 

1146 - Table 'xxx_xxxx.customer_testimonials' doesn't exist

select * FROM customer_testimonials WHERE status = 1 ORDER BY rand() LIMIT 1

[TEP STOP]

 

 

 

My Column_left.php is below.

 

Thanks for your help.

 

// {{ buySAFE Module
 if (MODULE_BUYSAFE_BUYSAFE_STATUS == 'True' && tep_not_null(MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA) && MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA != '-- none --' && $buysafe_result['IsBuySafeEnabled'] != 'false' && !$buysafe_result['faultstring']) echo "<!-- buySAFE //-->\n<tr><td align=\"center\"><script src=\"" . MODULE_BUYSAFE_BUYSAFE_ROLLOVER_URL . "\"></script><span id=\"BuySafeSealSpan\"><script type=\"text/javascript\">WriteBuySafeSeal('BuySafeSealSpan', '" . MODULE_BUYSAFE_BUYSAFE_SEAL_TYPE . "', 'HASH=" . urlencode(MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA) . "');</script> </span></td></tr>\n<!-- buySAFE_eof //-->\n";
// }}

 if ((USE_CACHE == 'true') && empty($SID)) {
echo tep_cache_categories_box();
 } else {
include(DIR_WS_BOXES . 'categories.php');
 }

 if ((USE_CACHE == 'true') && empty($SID)) {
echo tep_cache_manufacturers_box();
 } else {
include(DIR_WS_BOXES . 'manufacturers.php');
 }
 require(DIR_WS_BOXES . 'whats_new.php');
 require(DIR_WS_BOXES . 'search.php');
 if ($request_type == NONSSL) {   /* only show adsense in NON SSL else it causes warning */
include(DIR_WS_BOXES . 'google_adsense_search.php');
 }
 require(DIR_WS_BOXES . 'information.php');
  include(DIR_WS_BOXES . 'customer_testimonials.php');
?>

Edited by deckmaster

Share this post


Link to post
Share on other sites
I tried installing this, however it does not work for me.

The following errors were received.

 

Note: I have checked all the tables and they do exist in phpMyAdmin after the SQL file was ran.

 

I Used the column_left.php ,If I remove the Colum_left php the error goes away.

 

 

1146 - Table 'xxx_xxxx.customer_testimonials' doesn't exist

select * FROM customer_testimonials WHERE status = 1 ORDER BY rand() LIMIT 1

[TEP STOP]

 

 

 

My Column_left.php is below.

 

Thanks for your help.

 

// {{ buySAFE Module
  if (MODULE_BUYSAFE_BUYSAFE_STATUS == 'True' && tep_not_null(MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA) && MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA != '-- none --' && $buysafe_result['IsBuySafeEnabled'] != 'false' && !$buysafe_result['faultstring']) echo "<!-- buySAFE //-->\n<tr><td align=\"center\"><script src=\"" . MODULE_BUYSAFE_BUYSAFE_ROLLOVER_URL . "\"></script><span id=\"BuySafeSealSpan\"><script type=\"text/javascript\">WriteBuySafeSeal('BuySafeSealSpan', '" . MODULE_BUYSAFE_BUYSAFE_SEAL_TYPE . "', 'HASH=" . urlencode(MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA) . "');</script> </span></td></tr>\n<!-- buySAFE_eof //-->\n";
// }}

  if ((USE_CACHE == 'true') && empty($SID)) {
 echo tep_cache_categories_box();
  } else {
 include(DIR_WS_BOXES . 'categories.php');
  }

  if ((USE_CACHE == 'true') && empty($SID)) {
 echo tep_cache_manufacturers_box();
  } else {
 include(DIR_WS_BOXES . 'manufacturers.php');
  }
  require(DIR_WS_BOXES . 'whats_new.php');
  require(DIR_WS_BOXES . 'search.php');
  if ($request_type == NONSSL) {   /* only show adsense in NON SSL else it causes warning */
 include(DIR_WS_BOXES . 'google_adsense_search.php');
  }
  require(DIR_WS_BOXES . 'information.php');
   include(DIR_WS_BOXES . 'customer_testimonials.php');
?>

 

what version of mysql are you running?

Scott

Share this post


Link to post
Share on other sites

Hi

 

I have installed Customer Testimonial 3.51 and works great with STS4.58. Thanks for all the hard work! I have upgraded from 3.2 which did not work with STS. All I had to do was update the database and overwrite old files with new files.

 

Thanks!

 

Joey


I have installed:

Oscommerce version 2.2rc2a, STS version 4.5.8, Header Tags SEO version 3.1.5, SEO Assistant version 2.1

 

Thanks

Joey

Share this post


Link to post
Share on other sites

Customer Testimonials v3.6 is out: http://addons.oscommerce.com/info/5477

 

Upgrade path included in installation.txt - Full package

 

Since v3.5(1)

-------------

* Added further multi-lingual support in all areas

* Added email validation to the catalog and the admin

* Added date added field in the catalog

* Added language defines in catalog/includes/languages/english.php

* Added admin link in testimony submission email

* Removed unnecessary case in catalog

* Removed erroneous language defines

* HTML fixes in both the catalog and the admin

* Adjusted the admin language defines for consistency

* Rewrote code in catalog/customer_testimonials_write.php to make this addon compatible with my osC reCaptcha addon: http://addons.oscommerce.com/info/6306

* Rewrote code in catalog/includes/modules/customer_testimonials.php significantly

* Added screenshots to save bandwidth

* Added a new button in the catalog

 

Scott

Share this post


Link to post
Share on other sites
I am running MySQL client version: 4.1.20

with osCommerce V2.2 RC2

 

Thanks

 

Though I can not be certain of this, absolutely, it might be because you are on mySQL version less than 5.0... is it possible for you to upgrade? Also, try re-uploading all the files and double checking your edits...

 

Scott

Share this post


Link to post
Share on other sites
Though I can not be certain of this, absolutely, it might be because you are on mySQL version less than 5.0... is it possible for you to upgrade? Also, try re-uploading all the files and double checking your edits...

 

Scott

 

 

Nice wrapping up of this and recaptch with it, but how does one remove the email the author link in the customer testimonials. There are too many easy harvester software out there to have the customers emails so openly available on the customer testimonial page.

 

I HIGHLY ADVISE AGAINST ANYONE LEAVING THIS INTACT - YOU WILL LOSE FACE QUICKLY WITH CUSTOMERS WHO HAVE GIVEN TESTIMONIALS!!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×