Forums / Bug Reports / [Done 1.3.9] Media Collection - Clip Order jumbled

[Done 1.3.9] Media Collection - Clip Order jumbled

Locked

Views: 1,722

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
21 May 2008, 11:50 PM
#1
ingham_qld avatar

ingham_qld

New Zenner

Join Date:
Mar 2008
Posts:
29
Plugin Contributions:
0

[Done 1.3.9] Media Collection - Clip Order jumbled

I am using 1.3.8a and on one particular music product there are a few clips which "refuse" to sort into the correct numerical order which I have assigned.

I have tried to fix this in phpMyAdmin and cannot resolve the problem here either.

Here is a link to the page where you can see the issue: http://www.campbenaiah.org.au/store/index.php?main_page=product_music_info&products_id=18

18 Oct 2008, 3:56 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done 1.3.9] Media Collection - Clip Order jumbled

To make the media collection sort alphabetically on the filename, make the following change:

/includes/modules/media_manager.php
around lines 27-29 you'll see the following code. Make the change shown in red (adding the ORDER BY clause):```
} else {
$zv_clips_query = "select * from " . TABLE_MEDIA_CLIPS . "
where media_id = '" . (int)$zq_media_manager->fields['media_id'] . "'[B] order by clip_filename[/B]";

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Oct 2008, 5:06 AM
#3
ingham_qld avatar

ingham_qld

New Zenner

Join Date:
Mar 2008
Posts:
29
Plugin Contributions:
0

Re: [Done 1.3.9] Media Collection - Clip Order jumbled

:bigups:

Sweet! That did it!

Thanks, Dr. Byte.

It seems that some punctuation marks (eg, apostrophes) had been causing some of the problem. I ended up taking them out and that corrected most, but not all of the problems--until I added your suggested fix.

Everything looks great now!