product image select from top of list

Phoca Cart - complex e-commerce extension
redback
Phoca Member
Phoca Member
Posts: 12
Joined: 03 Mar 2010, 02:28

product image select from top of list

Post by redback »

Hello,
When adding a product image in Image Options is it possible for the image to appear at the top of the image list after you upload it an look to select.
Makes it easier to find and select the image when you have many images.
If so how do I make this happen.
Thank you.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: product image select from top of list

Post by Jan »

Hi, this is the list of files stored in server's browser, so it is ordered by standard ordering set by server. To change this, the code needs to be customized (to e.g. list the files based on date). But for now I didn't do such customization so really hard to say.

Line cca 149 here: administrator/components/com_phocacart/models/phocacartmanager.php

the standard Joomla function Folder::files() is used.

But when displaying it, there are only following methods used for ordering:

Code: Select all

// Sort the files based on either natural or alpha method
        if ($naturalSort) {
            natsort($arr);
        } else {
            asort($arr);
        }
:idea:

Jan
If you find Phoca extensions useful, please support the project
Post Reply