VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: vaskern on November 01, 2013, 14:01:38 PM

Title: Additional image text?
Post by: vaskern on November 01, 2013, 14:01:38 PM
(In frontend when viewing a product) when the additional image is clicked and changes place with the original image, the text below the image stays the same? I suppose the "vm-img-desc" should change along with the picture, right? Anyone else seeing this?

Using VM 2.0.24, J 2.5.14
Title: Re: Additional image text?
Post by: jjk on November 03, 2013, 23:01:39 PM
Quote from: vaskern on November 01, 2013, 14:01:38 PM
Anyone else seeing this?
Using VM 2.0.24, J 2.5.14

Do you have the same problem when you temporarily change your template? Mine works. However, on my life site I actually disabled the text under the additional images in order to have more space for the mini-thumbnails of additional images.
Title: Re: Additional image text?
Post by: vaskern on November 04, 2013, 15:38:46 PM
Yes, same thing when I try with Beez2 and Atomic..
Title: Re: Additional image text?
Post by: jenkinhill on November 05, 2013, 18:35:35 PM
Edit the Image Alt-Text on the image editor pane for each new image. Currently it defaults to the text used for the first product image uploaded.
Title: Re: Additional image text?
Post by: vaskern on November 06, 2013, 11:14:51 AM
Thanks, but alt text is already set. Take a look at the photobook (http://motivuppsala.se/kalendrar-boecker/fotoboken-uppsalabilder-info) for example. The "Displayed image subtitle" for the first image is "Fotoboken UppsalaƄret i bilder" and this does not change. When enlarging a photo the alt-text is displayed correctly, but when not enlarged the additional images all seem to get the same text as the first image?
Title: Re: Additional image text?
Post by: jjk on November 06, 2013, 13:07:07 PM
Quote from: vaskern on November 06, 2013, 11:14:51 AM
Thanks, but alt text is already set.
Did you click on 'Save' again after you changed the entry?

If this doesn't work, you can disable the display in
the file ...\components\com_virtuemart\assets\css\vmsite-ltr.css, approximately line 205 (preferably in an vmsite-ltr.css template override file)
from
.vm-img-desc{display:block;}
to
.vm-img-desc{display:none;}
Title: Re: Additional image text?
Post by: vaskern on November 06, 2013, 16:24:13 PM
Thanks. Did anyone take a look at the link above? Very easy to see the problem - the image changes but not the text. Strange if this is only occurs in my VM..?
Title: Re: Additional image text?
Post by: jjk on November 06, 2013, 20:43:05 PM
Quote from: vaskern on November 06, 2013, 16:24:13 PM
Thanks. Did anyone take a look at the link above?

Yes, we did. The issue has been reported to the developers, but at present we don't have a solution yet other than the workarounds mentioned above already.
Title: Re: Additional image text?
Post by: vaskern on November 06, 2013, 21:04:19 PM
Great, thanks
Title: Re: Additional image text?
Post by: duran.keeley on February 03, 2014, 09:33:43 AM
Here is how to fix it.

/components/com_virtuemart/views/productdetails/tmpl/default_images.php

Find:
jQuery(".additional-images .product-image").click(function() {
      jQuery(".main-image img").attr("src",this.src );
      jQuery(".main-image img").attr("alt",this.alt );
      jQuery(".main-image a").attr("href",this.src );
      jQuery(".main-image a").attr("title",this.alt );

Add:
jQuery(".main-image .vm-img-desc").text(this.alt );