Page 1 of 1

Alphabetical Order problem in download page

Posted: Fri Sep 16, 2016 5:01 am
by claud9
Hello,
I have this problem hope someone can help me!

I sell digital downloadable products. I don't understand why OC don't list in alphabetical order or numerical order the files my clients have to download causing a lot of confusion.
I have for example for a single product 29 files my client have to download.
I have named the files "01 product name" - "02 product name" etc etc but open cart, in the download page of my clients seems to order them randomly...

Any suggestion ?

Thanks a lot in advance for any help!

Re: Alphabetical Order problem in download page

Posted: Fri Sep 16, 2016 5:08 pm
by knowband.plugins
Yes, you got it right. OC doesn't list them in alphabetical or numerical order.

They are being shown in the order you link them to the product for admin panel.

Let us clear what we mean:

Suppose you have a Product A, which is supposed to linked with 5 virtual files.

You have named the file File A, File B, File C, File D and File E
But while adding download link to the Product A, you add them randomly, let's say
File C ,File B, File A, File E and File D

Then in front end if some customer makes the purchase, they will appear as follow
File C ,File B, File A, File E and File D
not as
File A, File B, File C, File D and File E

Hope it helps :)

Re: Alphabetical Order problem in download page

Posted: Fri Sep 16, 2016 11:31 pm
by claud9
Hi thanks for the suggestion.
Unfortunately this is not the problem, I have linked the files to the products in numerical order but OC continue to order them randomly , I think it's a bug of the code.

anyone can tell me where I have to look in the code to try to fix it?

Thanks

Re: Alphabetical Order problem in download page

Posted: Sat Sep 17, 2016 1:34 am
by knowband.plugins
Before replying to you we tried this thing in OC 2.0.0.0 and download list were appearing in the same sort order as we linked them with the product.

Could you please tell us exactly which version of Opencart are you using so that we can check if it is a bug.

Re: Alphabetical Order problem in download page

Posted: Sat Sep 17, 2016 3:34 am
by claud9
Hello,
I'm using the latest version 2.3.0.2

Thanks in advance for any help!

Re: Alphabetical Order problem in download page

Posted: Mon Sep 19, 2016 5:49 pm
by knowband.plugins
We just tried again in version 2.3.0.2 and noticed the issue.

Here is the fix to list them in alphabetical order:

1. Make backup of file /catalog/model/account/download.php

2. Edit file /catalog/model/account/download.php

3. Search for below code
o.date_added DESC

4. Replace searched code with code given below
dd.name ASC

Hope it helps !!