Answer the question
In order to leave comments, you need to log in
How to sort Opencart images?
Can you please tell me how to sort images in the Opencart 2.3 image manager
so that the latest added ones are the first in the list.
Solution:
Find
foreach($files as $file){
and put
code before it:
usort($files, create_function('$a,$b','return filemtime($b) - filemtime($a);')) ;
Does not help((
Answer the question
In order to leave comments, you need to log in
in the file \admin\controller\common\filemanager.php
we find $images = array_merge($directories, $files);
and then paste
usort($images, create_function('$a, $b','return filemtime($b) - filemtime($a);'));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question