News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How to sort additional product images in backend/admin view?

Started by Macovic, August 28, 2013, 19:08:37 PM

Previous topic - Next topic

Macovic

Hi there,

I'm currently working on VM 2.0.22a and Joomla 2.5.13. For product images in the frontshop I use Magic 360 which creates a nice looking 360°-pics from several product images.
Magic 360 requires images to be named in a certain way (ordered, numbered) to fully work. After bulk uploading the product images they get added to the product and are shown
as little thumbs right under the main images. But they aren't sorted anymore ...

How can I change the sorting of additional product images? I looked at these files:

=> template
- administrator/components/com_virtuemart/views/product/tmpl/product_edit_images.php
- administrator/components/com_virtuemart/views/product/view.html.php
- administrator/components/com_virtuemart/views/product/tmpl/default.php

=> model
- administrator/components/com_virtuemart/models/product.php

=> helper
- administrator/components/com_virtuemart/helpers/mediahandler.php

I tried this:

- change corresponding MySQL table to force sorting by ID => didn't work
  as seen here: https://forum.virtuemart.net/index.php?topic=80715.0

Changing DB didn't work for me ...

Any ideas?

Thanks,
John

Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Macovic

Hi, yes, I can sort it manually with drag and drop. But as I'm building a shop with hundreds of products each with at least 30 images this would never come to an end ...

This has to happen automagically ;-)


Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Macovic

They're sorted numerically ... e.g.

product-01-01.jpg
product-01-02.jpg
product-01-03.jpg
...
product-01-30.jpg

For each product I have minimum 30 images that get bulk uploaded. But then (even with automatic uploading one by one) these images are shown in pseudorandom order (01,17,16,15 ...) ... in backend as in frontend view.

What I need is a way that these images get their mediaIDs in the exact same order as I'm uploading. Or in product edit mode a way to order these images by name ...

Maxim Pishnyak

Did you tried to upload additional images with the help of CSVI Improved?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Macovic

I just took a look at CSVI Improved ... as far as I can see it's not possible to upload multiple images at once. But csvi offers lots of benefits I could use so thanks for this hint.

I figured out a workaround for my sorting problem. There are two options to get my images in the correct order:



- rename images before upload with this scheme:

image-01 => image-30
image-02 => image-17
image-03 => image-18
...
image-15 => image-16
image-16 => image-15
image-17 => image-02
image-18 => image-03
...
image-29 => image-14
image-30 => image-01




- OR upload images in specific order:

image-30 (single file upload)
images-17-29 (images 17 to 29 at once)
image-16
image-15
images-02-14
image-01


Strange, huh :o