After the customer has did his purchase

  • Posts: 23
  • Thank you received: 0
13 years 7 months ago #12128

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 7 months ago #12133

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.

  • Posts: 23
  • Thank you received: 0
13 years 7 months ago #12141

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 7 months ago #12146

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.

  • Posts: 23
  • Thank you received: 0
13 years 7 months ago #12148

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 7 months ago #12170

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 7 months ago #12212

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.054 seconds
Powered by Kunena Forum