Jump to content

How to display product page additional images in A-Z-0-9 order? CCv6.04


Syler

Recommended Posts

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.
 

Link to comment
Share on other sites

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'.

Link to comment
Share on other sites

:D 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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...