Post by Agathon » Tue Apr 11, 2017 2:19 pm

Hi to all community

I am facing an issue which is connected when i try in Admin page Sales->Orders to filter my orders by "Total amount"
I've tried to filter by total with any possible combination to match but anything i try to filter i receive message "no results"
filter_by_total.jpg

filter_by_total.jpg (213.23 KiB) Viewed 612 times

filter_by_total2.jpg

filter_by_total2.jpg (152.96 KiB) Viewed 612 times

I test it in a fresh installation of OC 2.1.0.2 as my version which is running live my website and it works properly. I assume that is any of my extensions which is block this filter. My custom theme is "Mediacenter".

I really appreciate any help you can provide

User avatar
New member

Posts

Joined
Thu Jan 23, 2014 6:45 pm

Post by thekrotek » Tue Apr 11, 2017 3:43 pm

Try searching by 14.51 (with dot) or 14.5100

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by harsh.k1987 » Tue Apr 11, 2017 6:14 pm

looks like you are trying to find price total with comma, while in database amount enter in dot format.
So at place of 17,00 try to search 17.00 if it still not work then there must be some extension confliction

Best Regards
Harry Kumar
hkdev1987@gmail.com
skype : hk.dev


New member

Posts

Joined
Tue May 26, 2015 7:59 pm
Location - india

Post by Agathon » Tue Apr 11, 2017 6:27 pm

Thanks for your answers.
I 've tried without comma and demical just integer number, also test it with dot but again the same result.
I think is any extension the Thing is how to find which one is it ? Do i have to search to my vqmod and ocmod extensions and how to understand which file path is affected.

User avatar
New member

Posts

Joined
Thu Jan 23, 2014 6:45 pm

Post by thekrotek » Tue Apr 11, 2017 7:22 pm

Start with looking in database on how this particular total is saved in database and then try to search for this value directly. Most likely it'll be 14.5100.

If you won't be able to filter orders by exact value, then you can move further in your quest.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Agathon » Tue Apr 11, 2017 8:14 pm

thekrotek wrote:
Tue Apr 11, 2017 7:22 pm
Start with looking in database on how this particular total is saved in database and then try to search for this value directly. Most likely it'll be 14.5100.

If you won't be able to filter orders by exact value, then you can move further in your quest.
I checked database values and as you can see in attached image is like you wrote in your post
filter_total_db.jpg

filter_total_db.jpg (20.96 KiB) Viewed 598 times

I test it again with this value and it filters properly.
filter_total_3.jpg

filter_total_3.jpg (128.92 KiB) Viewed 597 times

Question is how to make it work without checking database value ?

User avatar
New member

Posts

Joined
Thu Jan 23, 2014 6:45 pm

Post by thekrotek » Tue Apr 11, 2017 8:32 pm

Well, if you look into your own screenshot, you won't find any total equal to 14.51 or 82.27. At least, in this part of the table. Also, search is strict: dot as decimal, 4 digit after it. It's plain stupid, yes, but this is how it's coded right now. So you should search for exact value: 10.3714, for example.

Anyway, if you see these values in database and search still doesn't work, start disabling extensions to find out, which one causes the issue.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Agathon » Wed Apr 12, 2017 1:26 pm

Filter and Search is working properly in this way with 4 demical digits. But of course this is not possible to use it in this way. If i will find this part of Search - Filter code and add a round function to cut demical number from 14.5136 to 14.51 . Do you recommend it this ?

User avatar
New member

Posts

Joined
Thu Jan 23, 2014 6:45 pm

Post by thekrotek » Wed Apr 12, 2017 3:29 pm

Actually, you need to do it the right way. Something like this:

$sql .= " AND o.total LIKE '" . intval($data['filter_total']) . "%'";

This will search for totals STARTING WITH. So basically you will be able to search with 14 only. And with 14.51 as well.

A more professional approach is to take decimal point and float number for current currency and convert to database format (00.00). But I'm too lazy to write this down :-)

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Agathon » Wed Apr 12, 2017 8:30 pm

I am really thankful for your help.
I ll try it and let you know.

User avatar
New member

Posts

Joined
Thu Jan 23, 2014 6:45 pm
Who is online

Users browsing this forum: No registered users and 41 guests