Jump to content
Sign in to follow this  
john44

Complete Reviews System

Recommended Posts

Hi,

 

I've just installed the Complete Reviews System but when I try and save a review in the admin sysytem i get the error:

 

Call to undefined function tep_store_date() in reviews.php

 

Does anyone know where this function should be or where I should get it from. I've checked in the install folder and can't find it in there and also checked my original oscommerce files and can't find it there either.

 

If someone has this function would it be possible to post it here?

 

Thanks very much,

 

John

Share this post


Link to post
Share on other sites

I did not find the function either and wrote it now by my self.

 

Put this at the beginning of the admin/reviews.php file:

 function tep_store_date($date) {
 	$mysqltime = date ("Y-m-d H:i:s", strtotime($date));
 	return $mysqltime;
 }

Edited by groovesinc

Share this post


Link to post
Share on other sites

I have had the same problem. When tried to use your solution it did not provide me with good results. The date was going back go 1st of January, 1970. There is other solution I found which works great. You should add these lines in admin/includes/languages/(your-language).php

 

 

after:

 

function tep_date_raw($date, $reverse = false) {

if ($reverse) {

return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4);

} else {

return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);

}

}

 

add:

 

// return a dbase formatted date for ddmmyyyy format adjust if you use the mmddyyyy format

function tep_store_date ($date) {

 

return substr($date, 6, 4) . '-' . substr($date, 3, 2) . '-' . substr($date, 0, 2) . ' ' . date('H:i:s');

 

}

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  

×