PDA

View Full Version : customer testimonials



tinboye
04-15-2011, 09:06 PM
im looking for a customer testimonials addon for oscmax
i tried the scrolling customer testimonials for oscommerce but it doesnt appear to work as it broke my admin panel.

anyone have any suggestions?

pgmarshall
04-16-2011, 12:23 AM
I have not used this module myself but after a quick look through it should work fine.

Did you adjust the code to make allowances for the admin panel differences ... you can not simply drag and drop the files over the top ... eg. boxes/tools.php ... some of the code needs minor adjustments.

Regards,

met00
04-16-2011, 12:24 AM
Could you please clarify how it broke your admin panel?

For instance:

did it not run? [did you properly include the file in the admin files?]
did it now show up in the menu? [did you properly update the menu?]
did it run but throw a blank screen? [did you check the log files for php errors?]

"doesn't appear to work" doesn't give us a whole lot to work with in terms of what may have happened. In general, any mod created for oSCommerce 2.2 should be able to be shoehorned into osCmax 2.5 RC1 with only minor adjustments. When you are dealing with admin side modules then you have to make sure you add them in so they are secured, in the menus and working with php 5.2 [the three questions listed above]. If the mod still doesn't work, then tell us what you did so we can be a bit more helpful.

tinboye
04-18-2011, 05:16 PM
added the code which it indicated to the specific files. after doing so, when i went to my admin page it just came up blank

when i checked the php log for errors it never really indicated any issues other than my logo image missing from admin, this should not make it come up blank


for the menu link it said this:

Step 2.3 catalog/admin/includes/boxes/tools.php


Find:


'<a href="' . tep_href_link(FILENAME_SERVER_INFO) . '" class="menuBoxContentLink">' . BOX_TOOLS_SERVER_INFO . '</a><br>' .
Add just below it:


'<a href="' . tep_href_link(FILENAME_TESTIMONIALS_MANAGER) . '" class="menuBoxContentLink">' . BOX_TOOLS_TESTIMONIALS_MANAGER . '</a><br>' .

I changed this to


tep_admin_jqmenu(FILENAME_TESTIMONIALS_MANAGER, BOX_TOOLS_TESTIMONIALS_MANAGER, 'TOP') .
here are all the admin file mods they indicate
I dont know what exactly would have to be altered to make it work with oscmax 2.5rc1



Step 2.1 catalog/admin/includes/filenames.php


Add the following just before the last ?>:

define('FILENAME_TESTIMONIALS_MANAGER', 'testimonials_manager.php');


################################################


Step 2.2 catalog/admin/includes/database_tables.php


Add the following just before the last ?>:

define('TABLE_TESTIMONIALS', 'customer_testimonials');


################################################

Step 2.3 catalog/admin/includes/boxes/tools.php


Find:

'<a href="' . tep_href_link(FILENAME_SERVER_INFO) . '" class="menuBoxContentLink">' . BOX_TOOLS_SERVER_INFO . '</a><br>' .


Add just below it:

'<a href="' . tep_href_link(FILENAME_TESTIMONIALS_MANAGER) . '" class="menuBoxContentLink">' . BOX_TOOLS_TESTIMONIALS_MANAGER . '</a><br>' .



################################################

Step 2.4 catalog/admin/includes/functions/general.php


Add the following just before the last ?>:

// Sets the status of a testimonial
function tep_set_testimonials_status($testimonials_id, $status) {
if ($status == '1') {
return tep_db_query("update " . TABLE_TESTIMONIALS . " set status = '1' where testimonials_id = '" . $testimonials_id . "'");
} elseif ($status == '0') {
return tep_db_query("update " . TABLE_TESTIMONIALS . " set status = '0' where testimonials_id = '" . $testimonials_id . "'");
} else {
return -1;
}
}


################################################
Step 2.5 catalog/admin/includes/languages/english.php


Add the following just before the last ?>:

// Customer Testimonials
define('BOX_TOOLS_TESTIMONIALS_MANAGER', 'Testimonials Manager');
define('IMAGE_NEW_TESTIMONIAL', 'New Testimonial');


thanks

tinboye
04-18-2011, 05:20 PM
here is the code modifications it wants for frontend area



Step 2.6 catalog/includes/functions/html_output.php


Find the following near line 185:

// Output a form password field


ADD the following just ABOVE it:

// Output a form filefield
function tep_draw_file_field($name) {
$field = tep_draw_input_field($name, '', '', 'file');
return $field;
}

////
##########################################

Step 2.7 catalog/includes/languages/

english.php


Add the following just before the last ?>:


// Customer Testimonials
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_TESTIMONY_TITLE', 'Title: ');
define('TEXT_TESTIMONY_BY', 'Testimonial by: ');
define('TEXT_TESTIMONY_DATE_ADDED', 'Date added: ');
define('TEXT_TESTIMONY_OF', ' of ');
define('TEXT_MAILTO', 'mailto:');
define('TEXT_EMAIL_AUTHOR', 'Click to email the author');
define('IMAGE_BUTTON_SUBMIT', 'Submit to ' . STORE_NAME);
define('IMAGE_BUTTON_WRITE', 'Write a Testimonial');

// CST v1.11
define('NO_TESTIMONIALS_TEXT', 'No Testimonials available for your language');

// reCaptcha
define('ENTRY_SECURITY_CHECK', 'Security Code:');
define('ENTRY_SECURITY_CHECK1', 'Security Code');
define('ENTRY_SECURITY_CHECK_ERROR', 'The Security Code was not entered correctly:');


########################################

Step 2.8 catalog/includes/application_top.php


Find the following around line 263:

// include the mail classes
require(DIR_WS_CLASSES . 'mime.php');
require(DIR_WS_CLASSES . 'email.php');


Add just below it:

// Begin Scrolling Customer Testimonials v1.0
// file uploading class
require(DIR_WS_CLASSES . 'upload.php');
// End Scrolling Scrolling Customer Testimonials v1.0


#########################################

Step 2.9 catalog/includes/column_left.php OR catalog/ includes/column_right.php


Add the following wherever you want the CT InfoBox to appear (but before the last ?>):

// Begin Scrolling Customer Testimonials v1.0
// Do not load Testimonials box if page is SSL
// Why? It may trigger SSL warning
if ($request_type != 'SSL') {
include(DIR_WS_BOXES . 'customer_testimonials.php');
}
// End Scrolling Scrolling Customer Testimonials v1.0



#########################################

Step 2.10 catalog/includes/database_tables.php


Add the following just before the last ?>:

define('TABLE_CUSTOMER_TESTIMONIALS', 'customer_testimonials');


###################################

Step 2.11 catalog/includes/filenames.php


Add the following just before the last ?>:

define('FILENAME_CUSTOMER_TESTIMONIALS', 'customer_testimonials.php');
define('FILENAME_CUSTOMER_TESTIMONIALS_WRITE', 'customer_testimonials_write.php');
define('FILENAME_CUSTOMER_TESTIMONIALS_ADMIN_EMAIL ', 'customer_testimonials_admin_email.php');


###################################

Step 2.12 catalog/stylesheet.css


Add the following at the end of the file:

/* Begin Testimonials Scroller */
#pscroller_np {
height: 150px;
border: 0px;
padding: 5px;
}

.pscroller_c_np {
font-family: sans-serif;
font-size: 11px;
line-height: 1.5;
}

.marquee_hide {
visibility:hidden;
}
.marquee_show {
visibility:visible;
}
/* End Testimonials Scroller */_write.php');

pgmarshall
04-19-2011, 12:13 AM
And you have added the file to your admin permissions?

Broke your admin panel? Can you see the login page ... do you get the white screen after login or before?

Check you haven't put a typo in your language files - eg. unescaped ' " or failed to put a ; at the end of the define.

Regards,

tinboye
04-24-2011, 12:37 PM
it was a completely white page, no login box or anything, ill give it a try again ty

pgmarshall
04-24-2011, 03:00 PM
Okay - but you need to turn on the error reporting ... a completely blank white page is a php crash ... check your server logs and post the contents.

Regards,