AbanteCart Community
AbanteCart Development => Customization help => Topic started by: tony2017 on March 22, 2017, 01:06:50 AM
-
I am having a nightmare with sort in order.
My customers pay for download files and when they go into their account
the order is all upside down.
Example of the download files are below that appear to the customer:
2017-03-02
2017-03-06
2017-03-10
2017-03-14
2017-03-18
2017-03-05
2017-03-09
2017-03-13
2017-03-17
2017-03-21
2017-03-01
2017-03-04
2017-03-08
2017-03-12
2017-03-16
2017-03-20
2017-03-03
2017-03-07
The files should show like below
2017-03-01
2017-03-02
2017-03-03
2017-03-04
etc.
so how can I fix this problem and where?
I looked everywhere for an answer and could not find it.
I would appreciate any help.
Thank You in advance for your assistance.
Tony2017
-
Sorting is based on order date_added and download sort order sort_order
You can see this in the download class:
core/lib/download.php
Line: 473 and 517
ORDER BY o.date_added DESC, od.sort_order ASC ";
This indicates that you probably have some strange sort order set in downloads. If download sort_order is not set (0) it would sort by the date order created.
You can edit this code or suggest a solution that works for all or most cases.
-
OK,
What lines would i Change and change to what?
Thank You in advance.
tony2017
-
What lines would i Change and change to what?
My understanding, Line number was provided. What you need to set is up to you, is not it
What I do not understand is how your order/downloads are all with different create date.
-
Is there anything custom done? Can we check your customer account page with order downloads some how? Screenshot maybe?
-
There is no changes..
The files are by date
2017-03-01
2017-03-02
2017-03-03
2017-03-04
but instead of showing the above in order
it looks like below
2017-03-02
2017-03-06
2017-03-10
2017-03-14
2017-03-18
2017-03-05
2017-03-09
2017-03-13
2017-03-17
2017-03-21
2017-03-01
2017-03-04
2017-03-08
2017-03-12
2017-03-16
2017-03-20
2017-03-03
2017-03-07
the dates are files of downloads but I did not change any settings.
Tony 2017