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

Multiple images in VM2...

Started by Courtland, November 09, 2012, 02:23:53 AM

Previous topic - Next topic

Courtland

After reading through the forums I just have a simple Question... is http://forum.virtuemart.net/index.php?topic=100882.0 the only way to upload multiple images to VM2.0? this Functionality was built into 1.1.9 why would it be taken out? Any advice on different plug-ins or another thread showing how to use what VM2.0 has to make multiple images work?

jenkinhill

That plugin is handy if you have a lot of additional images to upload, or you could use ftp and CSVI.
But additional image upload has been part of VM2 for some time now. On the Product Images tab select images using the Upload File facility at the bottom of the page. Upload is for the main image or additional images, or you can replace the main image or just the main image thumb. Just hit save after selecting each image. You can also drag the images to change their order.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

16vmini

I think he means he wants to upload multiple images at the same time !

Matt

jenkinhill

Then do what it says in my first sentence.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Courtland

#4
Cool thanks Jenkinhill, and to clarify I am asking about just 1 or 2 additional product images not mass uploading.

When I follow the second method, I see additional images on my product page but it displays a missing image icon. I can click and it will open my image on a new page, but I would like the image shown with the product to an image that represents the additional image.. not a broken image icon. Also the thumb image appears too and since i am using different images for my thumb and main image I would like to keep the thumb image off the page. I'm going to look at my products details folder and see what kind of overrides I can do to edit this, but I don't know what I can do about the broken image icons. I have an image of the issue don't know if I can attach to *edited* post tho.

Courtland

Heres that pic

[attachment cleanup by admin]

Courtland

*hits the staples easy button* that was easy, I fixed the thumbs by clicking the image details option of the new images and assigning a path to the "used thumb url" field and uploading the image I want as a thumb to that path. Now to figure out how to hide the default thumb

Courtland

And my first thumb is now gone too! TYVM... Solution in case anyone else might come across this issue. Well for me anyway I'm sure that there are a few ways to skin this cat.

First override your default_images.php file in components/com_virtuemart/views/productdetails/tmpl/ directory by copying it to your computer and pasting it to templates/"your templates name"/html/com_virtuemart/productdetails/ if any of these files don't exist just create them this will override the virtuemart default_images.php preventing your changes from being overridden with your next update.

Around line 67-73 is the output of the additional images, its commented should be easy to find(this is a small file).

I just added info to the div that would let me hide the first one. I created a variable after the

if (count($this->product->images) > 0) {

I added a counter..
$add_image_count = 1;

then on the div output with each image i dded the counter so
echo '<div class="floatleft">' . $image->displayMediaThumb('class="product-image"', true, 'class="modal"', true, true) . '</div>'; //'class="modal"'

became..
echo '<div class="floatleft image_count_'. $add_image_count .'">' . $image->displayMediaThumb('class="product-image"', true, 'class="modal"', true, true) . '</div>'; //'class="modal"'

notice that I left floatleft intact, if you edit it you will lose the styling applied to it XD

and then I increment the counter... directly after that line
$add_image_count++;

Then its a simple matter of not displaying the first div...
in css add

.image_count_1{display:none;}

and thats it no more main thumb as an additional image. So the whole new image function looks like
if (count($this->product->images) > 0) {
$add_image_count = 1;
    foreach ($this->product->images as $image) {

echo '<div class="floatleft image_count_'. $add_image_count .'">' . $image->displayMediaThumb('class="product-image"', true, 'class="modal"', true, true) . '</div>'; //'class="modal"'
$add_image_count++;
    }

}


Interested if anyone has other ideas on how to achieve this output.

lostmail

#8
QuoteI think he means he wants to upload multiple images at the same time !

I can not figure out how to upload multiple images at one time....

Can not find out what the way is here....is there no "1-Step" Function available ????

I can only select ONE image for uploading....why is it not possible to choose more than 1 image a t a time to upload ???
Joomla 3.x | VirtueMart 4.0.12 107771 | HORME3 PRO 1.9.6 / 2.0
VirtueMart 4.2.4 | Joomla 4.4.1 | PHP 8.1 | Vp_neoteric 1.3