image sorting by date

image sorting by date

opencart version
opencart version 3.0.2 +
opencart version 3.0
opencart version 2.0
opencart version 1.5 +

image sorting by date wise in opencart all virsion

Verry smple solution i searched the internet and found how to sort the images by the last added. its annyoing if you have a lot of products. i go, uppload the 2-3 pictures i have on a product and then i have to go and search for the filename since the image in image manager. the solution is simple:

find this line:

Code: Select all

$files = glob($directory . '/' . $filter_name . '*.{jpg,jpeg,png,gif,JPG,JPEG,PNG,GIF}', GLOB_BRACE);

Add after:

array_multisort(array_map('filemtime', $files), SORT_NUMERIC, SORT_DESC, $files);

Disclaimer meaning : we are not sure all are information 100% right. but always trying a provided our team accurate info. read also disclaimer for youtube video

Reviews :

   Bad           Good