Skip to main content

After the customer has did his purchase

More
15 years 6 months ago #12128 by TanyaPro
Hello,
After the customer did his purchase and want to logout he gets this error message...
500 - No valid database connection: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 'ORDER BY a.cart_modified DESC LIMIT 1' at line 1 SQL=SELECT a.* FROM jos_hikashop_cart AS a WHERE ORDER BY a.cart_modified DESC LIMIT 1
What does i mean, what can I do about this?
Peter

Please Log in or Create an account to join the conversation.

More
15 years 6 months ago #12133 by nicolas
Hi,

That's a bug introduced with the latest version.
Please change the code:
$query='SELECT a.* FROM '.hikashop::table('cart').' AS a WHERE '.$filter.' ORDER BY a.cart_modified DESC LIMIT 1';
$this->database->setQuery($query);
$this->cart = $this->database->loadObject();
to:
if(!empty($filter)){
$query='SELECT a.* FROM '.hikashop::table('cart').' AS a WHERE '.$filter.' ORDER BY a.cart_modified DESC LIMIT 1';
$this->database->setQuery($query);
$this->cart = $this->database->loadObject();
}else{
$this->cart = null;
}

in the file administrator/components/com_hikashop/classes/cart.php and try again. That should solve the problem.

Please Log in or Create an account to join the conversation.

More
15 years 6 months ago #12141 by TanyaPro
I still have the same problem, can you send the file to me? I only have bank payment... Emails are also not been send to the administrator and the customer. What can I do about this?

Please Log in or Create an account to join the conversation.

More
15 years 6 months ago #12146 by nicolas
Mmm. That should have worked. Could you double check the modification ?

If that doesn't work, please also change the line:
$filter = implode(' OR ',$this->filters);
to:
if(!empty($this->filters)){
$filter = implode(' OR ',$this->filters);
}
and try again.

Please Log in or Create an account to join the conversation.

More
15 years 6 months ago #12148 by TanyaPro
It gives the same error message, also the emails are not send...
Do you like to check my website, I have the extplorer component so you can check everything into my backend.
Peter

Please Log in or Create an account to join the conversation.

More
15 years 6 months ago #12170 by nicolas
Yes please. You can send the access via our contact form: www.hikashop.com/en/support/contact-us.html
please specify the url of that thread so that we know why you're sending your accesses.

Please Log in or Create an account to join the conversation.

More
15 years 5 months ago #12212 by nicolas
I looked at your cart.php file and I saw that you didn't do the first modification I talked about. I've done it. Could you tell us if it works now ?

Please Log in or Create an account to join the conversation.

Time to create page: 0.199 seconds
Powered by Kunena Forum