AbanteCart Community

AbanteCart Development => Extensions and Add-Ons => Topic started by: rvalani on October 13, 2016, 05:58:12 PM

Title: Error for viewed products extension
Post by: rvalani on October 13, 2016, 05:58:12 PM
Hi I am using this viewed Products extension and it was working fine untill I upgraded my version to 1.2.8 now it throws me error "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 621, 633) AND customer_group_id = '1' AND ((date_start = '0000-00' at line 3 in /home/amer/public_html/live_128/core/database/apdomysql.php on line 54" and takes me to static_pages/index.php And if I turn off this extension it work fine I get this error when the site is loaded for first time and I click on any product
I tried edit the controller for this extension at line 145 with private function getProductsfromIDs($products) {
if (!$products) {
return array();
}
foreach ($products as $k => $v){
if($v == ""){
unset($products[$k]);
}
}
But still it is not working and throwing me error
Can you guys please help me?
Title: Re: Error for viewed products extension
Post by: abolabo on October 14, 2016, 04:36:35 AM
can you switch to amysqli database driver in config.php to check?
Title: Re: Error for viewed products extension
Post by: rvalani on October 14, 2016, 10:28:41 AM
Tried that and it throws an error

Fatal error: Class 'mysqli' not found in /home/amer/public_html/live_128/core/database/amysqli.php on line 46
Title: Re: Error for viewed products extension
Post by: digitalt on October 14, 2016, 10:41:35 AM
Go thru cPanel to you sql database and change date_start to 1970-01-01.  Common sql error. You could crank the date up to anywhere as long as it's not "0"

May or may not work, but the date_start can throw an error. I have come across this problem elsewhere.