Author Topic: Multiple images in VM2...  (Read 3984 times)

Courtland

  • Beginner
  • *
  • Posts: 20
Multiple images in VM2...
« on: November 09, 2012, 02:23:53 am »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27501
  • Always on vacation
    • Jenkin Hill Internet
Re: Multiple images in VM2...
« Reply #1 on: November 09, 2012, 11:31:21 am »
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

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.6.1.10121 on Joomla 3.9.11 PHP 7.0.33
Testing 3.6.1.10129 on Joomla 3.9.11

16vmini

  • Beginner
  • *
  • Posts: 23
Multiple images in VM2...
« Reply #2 on: November 09, 2012, 11:39:14 am »
I think he means he wants to upload multiple images at the same time !

Matt

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27501
  • Always on vacation
    • Jenkin Hill Internet
Re: Multiple images in VM2...
« Reply #3 on: November 09, 2012, 12:50:36 pm »
Then do what it says in my first sentence.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.6.1.10121 on Joomla 3.9.11 PHP 7.0.33
Testing 3.6.1.10129 on Joomla 3.9.11

Courtland

  • Beginner
  • *
  • Posts: 20
Re: Multiple images in VM2...
« Reply #4 on: November 09, 2012, 18:38:10 pm »
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

  • Beginner
  • *
  • Posts: 20
Re: Multiple images in VM2...
« Reply #5 on: November 09, 2012, 18:55:27 pm »
Heres that pic

[attachment cleanup by admin]

Courtland

  • Beginner
  • *
  • Posts: 20
Re: Multiple images in VM2...
« Reply #6 on: November 09, 2012, 19:06:32 pm »
*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

  • Beginner
  • *
  • Posts: 20
Re: Multiple images in VM2...
« Reply #7 on: November 09, 2012, 19:42:15 pm »
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

Code: [Select]
if (count($this->product->images) > 0) {
I added a counter..
Code: [Select]
$add_image_count = 1;
then on the div output with each image i dded the counter so
Code: [Select]
echo '<div class="floatleft">' . $image->displayMediaThumb('class="product-image"', true, 'class="modal"', true, true) . '</div>'; //'class="modal"'
became..
Code: [Select]
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
Code: [Select]
$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
Code: [Select]
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

  • Jr. Member
  • **
  • Posts: 240
Re: Multiple images in VM2...
« Reply #8 on: June 02, 2013, 18:13:50 pm »
Quote
I 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 + VM 3.6.

joommasters

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 25
  • Skype Name: tungpscnc
Re: Multiple images in VM2...
« Reply #9 on: July 04, 2013, 05:03:29 am »