News:

AbanteCart v1.4.2 is released.

Main Menu

Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

Changing Sort In Order

Started by tony2017, March 22, 2017, 01:06:50 AM

Previous topic - Next topic

tony2017


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





abantecart

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.

Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

tony2017

OK,

What lines would i Change and change to what?

Thank You in advance.

tony2017

eCommerce Core

Quote from: tony2017 on March 23, 2017, 03:44:26 AM

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.
"If you're in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent."
― Warren Buffett

abantecart

Is there anything custom done? Can we check your customer account page with order downloads some how? Screenshot maybe?
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

tony2017

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



Forum Rules Code of conduct
AbanteCart.com 2010 -