images without title on mouseover

  • Posts: 92
  • Thank you received: 0
11 years 4 days ago #133829

-- HikaShop version -- : 2.2.2
-- Joomla version -- : 2.5.11
-- PHP version -- : 5.3.13

Hi,
Recently I upgraded to version 2.2.2. I had any problem, except with images in product page.
After I upgraded version, images don't display its own title on mouseover.
Is it a bug?
thanks

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 4 days ago #133867

Hi,
Can you test it with another template so that we can see if your problem is coming from some views customization that you have made through "Hikashop->Display->Views".
Also can you give us a link to the page where you are having your issue ?

Please Log in or Create an account to join the conversation.

  • Posts: 92
  • Thank you received: 0
11 years 3 days ago #133995

I tested it with four more templates and none displays the titles of images.
This is the link to one of the products, but none works:
Forro polar

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 3 days ago #134005

You'll be able to add your image title by editing the "show_block_img" file of your "product" view of your front-end template, and add a "title" through these lines :

$html = '<img id="hikashop_main_image'.$variant_name.'" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" title="" src="'.$img->url.'"/>';
And these lines :
$html = '<img class="hikashop_child_image" title="" src="'.$img->url.'"/>';

Last edit: 11 years 3 days ago by Mohamed Thelji.

Please Log in or Create an account to join the conversation.

  • Posts: 92
  • Thank you received: 0
11 years 3 days ago #134012

your solution is not possible for me. When I added each image in each product I put a different name to each one.
In older versions, this name of each image displayed on mouseover and I don't know why not right now

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 2 days ago #134092

Ok, so if you want to display your file name, you'll just have to edit this line :

$html = '<img id="hikashop_main_image'.$variant_name.'" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" title="" src="'.$img->url.'"/>';
By :
$html = '<img id="hikashop_main_image'.$variant_name.'" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" title="'.$img->filename.'" src="'.$img->url.'"/>';
And this line :
$html = '<img class="hikashop_child_image" title="" src="'.$img->url.'"/>';
By :
$html = '<img class="hikashop_child_image" title="'.$img->filename.'" src="'.$img->url.'"/>';

The following user(s) said Thank You: pymgym

Please Log in or Create an account to join the conversation.

  • Posts: 92
  • Thank you received: 0
11 years 2 days ago #134124

I send a screenshot with what I'd want.
Could it be possible?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 1 day ago #134273

Hi,

You can add the following attribute alt="' . $image->file_name . '" in the image tags of the view "product / show_block_img"

Please Log in or Create an account to join the conversation.

  • Posts: 92
  • Thank you received: 0
11 years 1 day ago #134308

instead of the attribute alt="' . $image->file_name . '" I added the attribute title="' . $image->file_name . '" (what I needed) and it works, but in products with more than one image, the title displayed is always that of the first image though you change it.
could it be possible to arrange it?

thanks and always thanks

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
11 years 6 hours ago #134507

That's a lot more complex. You need to change the changeImage javascript function in order to support a new title attribute and update the el title attribute with it in the function and then in the call of the changeImage function you need to add that parameter too.

Please Log in or Create an account to join the conversation.

  • Posts: 92
  • Thank you received: 0
10 years 11 months ago #134650

thanks but I have the same skills of javascript than of php, This wants to say nothing at all :blush:
Could you say to me what I have to change exactly?

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
10 years 11 months ago #134682

Unfortunately, we can't do that as per our standard support as it's more than just 2 lines of code. Please do that with the help of a developer as part of a customization job.

Please Log in or Create an account to join the conversation.

  • Posts: 92
  • Thank you received: 0
10 years 11 months ago #134971

ten months ago I posted the same problem with tooltip:

It finalizes doubt on the topic: if I change the first image into other one of another color, the tooltip of the first one continues appearing. It is a bug or I have done slightly badly?

And Xavier answered it seemed to be a bug and you corrected in your end and It would be available in the next release.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 11 months ago #135056

Hi,

Recently some changes have been made regarding the images title and alt tags.
I just tried on my end, and when I'm hovering another thumbnail the good title is displayed in the tooltip of the main image.
So thanks to wait until the next release and tell us if that correct your issue.

The following user(s) said Thank You: pymgym

Please Log in or Create an account to join the conversation.

  • Posts: 92
  • Thank you received: 0
10 years 11 months ago #135102

thanks,
I'm waiting for next release and I'll tell you if all is corrected.

Please Log in or Create an account to join the conversation.

Time to create page: 0.105 seconds
Powered by Kunena Forum