I need alt image in product page

  • Posts: 62
  • Thank you received: 1
  • Hikashop Business
2 months 4 days ago #363891

-- HikaShop version -- : 5.1.1
-- Joomla version -- : 5
-- PHP version -- : 8.2
-- Error-message(debug-mod must be tuned on) -- : Alt image in product page

Hi,
I need to show alt image in product page,now if i fill the fields, is not show in source of the page
prnt.sc/m9pi2K8nkdwp

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

  • Posts: 83007
  • Thank you received: 13398
  • MODERATOR
2 months 3 days ago #363893

Hi,

I'm surprised this is not the case on your end.
The display of the image there is made with the code:

$html = '<img id="hikashop_main_image'.$variant_name.'" '.$attributes.' title="'.$this->escape((string)@$image->file_description).'" alt="'.$this->escape((string)@$image->file_name).'" src="'.$img->url.'"/>';
in the file components/com_hikashop/views/product/tmpl/show_block_img.php
As you can see there, the code uses the file_name of the file, which is the value from the input "Name (ALT)" in your screenshot.
Now, HikaShop will use the name of the product if the file Name is not provided. But you're saying that's not the case on your end. So I don't know how that result is possible.
Could you try switching your Joomla template to the default one temporarily and see if you have the correct ALT in that case ?
If yes, then it must come from a view override in your template. If not, then we'll need a backend and FTP access in order to check the situation.

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

Time to create page: 0.055 seconds
Powered by Kunena Forum