[Skip to main content](#vessel-content)

#   After the customer has did his purchase

##

- **[TanyaPro](/forum/user/1626-tanyapro "View TanyaPro's Profile")**
- [![TanyaPro's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1626-tanyapro "View TanyaPro's Profile") Topic Author
- [ Offline](/forum/user/1626-tanyapro)

Less More

- Posts: 23
- Thank you received: 0
-
-

15 years 7 months ago [\#12128](#12128) by [TanyaPro](/forum/user/1626-tanyapro "View TanyaPro's Profile")  *[After the customer has did his purchase](/forum/4-how-to/12128-after-the-customer-has-did-his-purchase#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&#95;modified DESC LIMIT 1' at line 1 SQL=SELECT a.&#42; FROM jos&#95;hikashop&#95;cart AS a WHERE ORDER BY a.cart&#95;modified DESC LIMIT 1 What does i mean, what can I do about this? Peter")* was created by *[TanyaPro](/forum/user/1626-tanyapro "View TanyaPro's Profile")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEyMTI4LWFmdGVyLXRoZS1jdXN0b21lci1oYXMtZGlkLWhpcy1wdXJjaGFzZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

15 years 7 months ago [\#12133](#12133) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: After the customer has did his purchase](/forum/4-how-to/12128-after-the-customer-has-did-his-purchase#12133 "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&#95;modified DESC LIMIT 1' at line 1 SQL=SELECT a.&#42; FROM jos&#95;hikashop&#95;cart AS a WHERE ORDER BY a.cart&#95;modified DESC LIMIT 1 What does i mean, what can I do about this? Peter")*

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-&gt;database-&gt;setQuery($query);
$this-&gt;cart = $this-&gt;database-&gt;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-&gt;database-&gt;setQuery($query);
$this-&gt;cart = $this-&gt;database-&gt;loadObject();
}else{
$this-&gt;cart = null;
}

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEyMTI4LWFmdGVyLXRoZS1jdXN0b21lci1oYXMtZGlkLWhpcy1wdXJjaGFzZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[TanyaPro](/forum/user/1626-tanyapro "View TanyaPro's Profile")**
- [![TanyaPro's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1626-tanyapro "View TanyaPro's Profile") Topic Author
- [ Offline](/forum/user/1626-tanyapro)

Less More

- Posts: 23
- Thank you received: 0
-
-

15 years 7 months ago [\#12141](#12141) by [TanyaPro](/forum/user/1626-tanyapro "View TanyaPro's Profile")  Replied by *[TanyaPro](/forum/user/1626-tanyapro "View TanyaPro's Profile")* on topic *[Re: After the customer has did his purchase](/forum/4-how-to/12128-after-the-customer-has-did-his-purchase#12141 "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&#95;modified DESC LIMIT 1' at line 1 SQL=SELECT a.&#42; FROM jos&#95;hikashop&#95;cart AS a WHERE ORDER BY a.cart&#95;modified DESC LIMIT 1 What does i mean, what can I do about this? Peter")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEyMTI4LWFmdGVyLXRoZS1jdXN0b21lci1oYXMtZGlkLWhpcy1wdXJjaGFzZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

15 years 7 months ago [\#12146](#12146) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: After the customer has did his purchase](/forum/4-how-to/12128-after-the-customer-has-did-his-purchase#12146 "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&#95;modified DESC LIMIT 1' at line 1 SQL=SELECT a.&#42; FROM jos&#95;hikashop&#95;cart AS a WHERE ORDER BY a.cart&#95;modified DESC LIMIT 1 What does i mean, what can I do about this? Peter")*

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-&gt;filters);
to:
if(!empty($this-&gt;filters)){
$filter = implode(' OR ',$this-&gt;filters);
}
and try again.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEyMTI4LWFmdGVyLXRoZS1jdXN0b21lci1oYXMtZGlkLWhpcy1wdXJjaGFzZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[TanyaPro](/forum/user/1626-tanyapro "View TanyaPro's Profile")**
- [![TanyaPro's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1626-tanyapro "View TanyaPro's Profile") Topic Author
- [ Offline](/forum/user/1626-tanyapro)

Less More

- Posts: 23
- Thank you received: 0
-
-

15 years 7 months ago [\#12148](#12148) by [TanyaPro](/forum/user/1626-tanyapro "View TanyaPro's Profile")  Replied by *[TanyaPro](/forum/user/1626-tanyapro "View TanyaPro's Profile")* on topic *[Re: After the customer has did his purchase](/forum/4-how-to/12128-after-the-customer-has-did-his-purchase#12148 "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&#95;modified DESC LIMIT 1' at line 1 SQL=SELECT a.&#42; FROM jos&#95;hikashop&#95;cart AS a WHERE ORDER BY a.cart&#95;modified DESC LIMIT 1 What does i mean, what can I do about this? Peter")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEyMTI4LWFmdGVyLXRoZS1jdXN0b21lci1oYXMtZGlkLWhpcy1wdXJjaGFzZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

15 years 7 months ago [\#12170](#12170) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: After the customer has did his purchase](/forum/4-how-to/12128-after-the-customer-has-did-his-purchase#12170 "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&#95;modified DESC LIMIT 1' at line 1 SQL=SELECT a.&#42; FROM jos&#95;hikashop&#95;cart AS a WHERE ORDER BY a.cart&#95;modified DESC LIMIT 1 What does i mean, what can I do about this? Peter")*

Yes please. You can send the access via our contact form: [ www.hikashop.com/en/support/contact-us.html](http://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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEyMTI4LWFmdGVyLXRoZS1jdXN0b21lci1oYXMtZGlkLWhpcy1wdXJjaGFzZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

15 years 7 months ago [\#12212](#12212) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: After the customer has did his purchase](/forum/4-how-to/12128-after-the-customer-has-did-his-purchase#12212 "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&#95;modified DESC LIMIT 1' at line 1 SQL=SELECT a.&#42; FROM jos&#95;hikashop&#95;cart AS a WHERE ORDER BY a.cart&#95;modified DESC LIMIT 1 What does i mean, what can I do about this? Peter")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEyMTI4LWFmdGVyLXRoZS1jdXN0b21lci1oYXMtZGlkLWhpcy1wdXJjaGFzZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.171 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
