Syler Posted May 31, 2015 Share Posted May 31, 2015 Hi Everyone,I cannot get the additional images in the product page to line in alphabetical or numerical orders based on the file names.has anyone come across this issue before? Anybody know which code that I need to tweak please?I have cleared image cache and all, but still they just all over the place.Thank you. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 31, 2015 Share Posted May 31, 2015 Please try this: In /classes/catalogue.class.php, private function _productGallery(), near line 1692 (for CC604).About 10 lines in, there is this:if (($gallery = $GLOBALS['db']->select('`'.$GLOBALS['config']->get('config', 'dbprefix').'CubeCart_image_index` AS `i` INNER JOIN `'.$GLOBALS['config']->get('config', 'dbprefix').'CubeCart_filemanager` AS `f` ON i.file_id = f.file_id', false, 'i.product_id = '.$product_id, 'ORDER BY i.main_img DESC'))) {Change just this part: 'ORDER BY i.main_img DESC' to look like 'ORDER BY i.main_img DESC, f.filename'. Quote Link to comment Share on other sites More sharing options...
Syler Posted May 31, 2015 Author Share Posted May 31, 2015 Yoohooo.. it works!Conclusion:If anyone wants a full control of the way the additional images are arranged in your product page, name your image files accordingly (alphabetical/numerical order) and follow the instruction from bsmither above and you'll be right.Again, Thank you bsmither. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.