- Posts: 640
- Thank you received: 16
Store images sorted by name when dropped as group
- PeterChain
-
Topic Author
- Offline
Less
More
11 years 8 months ago #187880
by PeterChain
Store images sorted by name when dropped as group was created by PeterChain
-- HikaShop version -- : 2.3.5
-- HikaMarket version -- : 1.5.1
-- Joomla version -- : 3.3.6
In a massive process of data entry I'm throwing sets of 6 pictures in the image drop area in product frontend edition.
The problem is that there is no apparent logical criteria on how they get sorted there. I believe they just show by the order they have been stored in the system so the smaller ones always show as the main and first pictures.
I drop my sets ordered by name from 01 to 06 in a single drag&drop operation and I would like this order to be respected so the criteria would be filename ordering.
How can this be fixed? I believe this is a major need for most users.
-- HikaMarket version -- : 1.5.1
-- Joomla version -- : 3.3.6
In a massive process of data entry I'm throwing sets of 6 pictures in the image drop area in product frontend edition.
The problem is that there is no apparent logical criteria on how they get sorted there. I believe they just show by the order they have been stored in the system so the smaller ones always show as the main and first pictures.
I drop my sets ordered by name from 01 to 06 in a single drag&drop operation and I would like this order to be respected so the criteria would be filename ordering.
How can this be fixed? I believe this is a major need for most users.
Please Log in or Create an account to join the conversation.
11 years 8 months ago #187881
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Store images sorted by name when dropped as group
Hi,
The images are sorted by order of upload (when upload by group) ; because they are not uploaded in the same call (all made using by ajax) there is no possibility to set a dynamic ordering.
But once the image uploaded, you can drag&drop them in order to change the ordering (and save the product to apply the modifications).
Regards,
The images are sorted by order of upload (when upload by group) ; because they are not uploaded in the same call (all made using by ajax) there is no possibility to set a dynamic ordering.
But once the image uploaded, you can drag&drop them in order to change the ordering (and save the product to apply the modifications).
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- PeterChain
-
Topic Author
- Offline
Less
More
- Posts: 640
- Thank you received: 16
11 years 8 months ago #187895
by PeterChain
Yes of course, but this is precisely what I want to avoid, having to reorder them product by product picture by picture.
Is there no way to change the ordering criteria to honour the alphabetical name order?
Replied by PeterChain on topic Store images sorted by name when dropped as group
Jerome wrote: But once the image uploaded, you can drag&drop them in order to change the ordering (and save the product to apply the modifications).
Yes of course, but this is precisely what I want to avoid, having to reorder them product by product picture by picture.
Is there no way to change the ordering criteria to honour the alphabetical name order?
Please Log in or Create an account to join the conversation.
11 years 8 months ago #187899
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Store images sorted by name when dropped as group
Hi,
The ordering is made thanks to a specific column in the HikaShop database.
So if you want to override that, you will have to override how HikaShop store his data in the database ; using a custom plugin and using the trigger "onBeforeProductSave" to change the ordering of the images depending their name.
But at this moment the user won't be able to reorder the images manually.
Regards,
The ordering is made thanks to a specific column in the HikaShop database.
So if you want to override that, you will have to override how HikaShop store his data in the database ; using a custom plugin and using the trigger "onBeforeProductSave" to change the ordering of the images depending their name.
But at this moment the user won't be able to reorder the images manually.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- PeterChain
-
Topic Author
- Offline
Less
More
- Posts: 640
- Thank you received: 16
11 years 8 months ago #187912
by PeterChain
Replied by PeterChain on topic Store images sorted by name when dropped as group
This sounds worth to try. But, is there some way that onBeforeProductSave differentiates between the first time a product is saved and all other times?
I mean, would make sense that a supposed onBeforeFirstProductSave would do the ordering and on later editions the user ordering if ever changed would be respected.
I mean, would make sense that a supposed onBeforeFirstProductSave would do the ordering and on later editions the user ordering if ever changed would be respected.
Please Log in or Create an account to join the conversation.
11 years 8 months ago #187959
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Store images sorted by name when dropped as group
Hi,
To be precise, yes.
Because they are two different triggers in HikaShop : onBeforeProductCreate ; onBeforeProductUpdate
So can know where a product is created or updated.
During the update you can have the old product object and you can check the ordering of the images.
They are some possibilities but it requires some further analyze.
Regards,
To be precise, yes.
Because they are two different triggers in HikaShop : onBeforeProductCreate ; onBeforeProductUpdate
So can know where a product is created or updated.
During the update you can have the old product object and you can check the ordering of the images.
They are some possibilities but it requires some further analyze.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: PeterChain
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.298 seconds