Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Changing Sort In Order  (Read 4624 times)

Offline tony2017

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-2
    • View Profile
Changing Sort In Order
« 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





Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Changing Sort In Order
« Reply #1 on: March 22, 2017, 04:01:50 PM »
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
Code: [Select]
   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

Offline tony2017

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-2
    • View Profile
Re: Changing Sort In Order
« Reply #2 on: March 23, 2017, 03:44:26 AM »
OK,

What lines would i Change and change to what?

Thank You in advance.

tony2017

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: Changing Sort In Order
« Reply #3 on: March 23, 2017, 01:46:01 PM »

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

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Changing Sort In Order
« Reply #4 on: March 23, 2017, 01:54:07 PM »
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

Offline tony2017

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-2
    • View Profile
Re: Changing Sort In Order
« Reply #5 on: March 23, 2017, 04:40:53 PM »
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



 

Powered by SMFPacks Social Login Mod