alt tag on the Hikashop categories images

  • Posts: 719
  • Thank you received: 3
10 years 3 months ago #135645

-- url of the page with the problem -- : mywebsite.com/mypage
-- HikaShop version -- : x.x.x
-- Joomla version -- : x.x
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hi,
i'd like to improve my SEO and Bing noticed that some of my Hikashop images are without ALT.
How can i do to have the ALT on the images of Hikashop categories?


my site with Hikashop
www.lacasettabio.it
Last edit: 10 years 3 months ago by lacasetta.

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

  • Posts: 12953
  • Thank you received: 1778
10 years 3 months ago #135710

Hi,
reading this thread will probably help you :

Voila j'ai trouvé une solution toute simple j'ai utilisé l'excellent Rereplacer de www.nonumber.nl

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

  • Posts: 719
  • Thank you received: 3
10 years 3 months ago #135797

Hi,
do you mean i have to install something else to have the alternative text on the categories of the Hikashop images?
If yes, don't you think that hikashop must have the ALt inside itself?


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
10 years 3 months ago #135807

It would be great yes. But it's not yet done for categories. That's why Mohamed gave you a potential solution in the mean time.

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

  • Posts: 719
  • Thank you received: 3
10 years 3 months ago #135837

ahh, Ok! ;)
Could you tel me what module have i to install, plesae?


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 12953
  • Thank you received: 1778
10 years 3 months ago #135854

Hi,
The ReReplacer extension will probably do the job :).

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

  • Posts: 719
  • Thank you received: 3
10 years 3 months ago #135995

I found it difficult for me.
Is there a way to modify the code just to have the same alt text on all the categories images?
Something, why not, "Hikashop" at the place of the real image text. Just to fill the altenative texts!


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 13201
  • Thank you received: 2322
10 years 3 months ago #136038

Hi,

To add value in the alt and title tags, you can add the desired value at the end of this line:

echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name), '' , '' , $this->image->main_thumbnail_x,  $this->image->main_thumbnail_y);
in the view "category / listing_img_title" via the menu Display > View.

You can display for example the category name with that code:
echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name), '' , '' , $this->image->main_thumbnail_x,  $this->image->main_thumbnail_y,$this->row->category_name);

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

  • Posts: 719
  • Thank you received: 3
10 years 3 months ago #136169

Hi Xavier,
It works fine!
It was so simple ....! :) ;)
Thanks a lot
Regards


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 32
  • Thank you received: 3
8 years 4 months ago #219096

HikaShop Business: 2.6.0

Hi
I am facing the same problem without success.

Part of the message is hidden for the guests. Please log in or register to see it.

I try the code given here by Xavier but nothing. Even breaking the code at view category page
Any help is welcome.

Last edit: 8 years 4 months ago by RobertC.

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
8 years 4 months ago #219102

Hi,

The code of the view changed since two years so you can't do that anymore.
But in fact, the title tag is already displayed in the view file:

echo '<img class="hikashop_product_listing_image" title="'.$this->escape(@$this->row->file_description).'" alt="'.$this->escape(@$this->row->file_name).'" src="'.$img->url.'"/>';
If you want to set the category_name instead of the file_name, it's easy to do.
Just replace $this->row->file_name by $this->row->category_name in that code

The following user(s) said Thank You: RobertC

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

  • Posts: 32
  • Thank you received: 3
8 years 4 months ago #219157

Hi
The alt tag is added at related categories view with the main but still not configured at main category image.

<div class="hikashop_category_description">
                                        <img src="/media/com_hikashop/upload/baseline5-721539079.png" class="hikashop_category_image">
                                                <div class="hikashop_category_description_content">

Can we add code for alt tag with the same way as previews?
What about the title? see sample above
<img class="hikashop_product_listing_image"" title="" alt="UV Gel series" src="/media/com_hikashop/upload/thumbnails/220x250f/bannerbase_gel_2.png">
I always have the option to not show the image . but if there is a way to fix it, why not

Thank you for your time

Last edit: 8 years 4 months ago by RobertC.

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
8 years 4 months ago #219159

Hi,

As yeah, I didn't thought about the main image.
You can change the line:

<img src="<?php echo $this->image->getPath($this->element->file_path); ?>" class="hikashop_category_image"/>
to:
<img src="<?php echo $this->image->getPath($this->element->file_path); ?>" class="hikashop_category_image" title="<?php echo $this->escape(@$this->element->file_description); ?>" alt="<?php echo $this->escape(@$this->element->file_name); ?>"/>
in the file "listing" of the views "product" and "category" for your frontend template and that will do it.
We'll change that on our end too.

The following user(s) said Thank You: RobertC

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

  • Posts: 104
  • Thank you received: 5
7 years 5 months ago #253198

If the alt code was added to the view, why am I not getting alt values at my url?
www.p3proswing.com/site3/index.php?optio...t=listing&Itemid=166

Please let me know so I can fix these SEO nuisances.

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
7 years 5 months ago #253200

Hi,

First, this thread is about adding the ALT tag to the images of the categories on the categories listing, while your link is a listing of products. So there is no link between this thread and the ALT tags on your images on that page.
Secondly, the images of the products on your link do have an ALT tag:
take.ms/6JNEj

So I don't understand what problem you have and why you think it's related to the ALT tag but we would need more information to be able to help you.

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

  • Posts: 104
  • Thank you received: 5
7 years 5 months ago #253400

The ProX Lite & ProX Plus do not

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
7 years 5 months ago #253449

They do: take.ms/RdZJd
It's just empty before you didn't enter anything in for that image.
Edit your product, edit the image, and fill the different fields and you'll see that it will appear in the ALT tag of the image on that page.

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

  • Posts: 104
  • Thank you received: 5
7 years 5 months ago #253508

Thanks. I found where clicking on the image would allow for the <ALT> and Title information. Very much appreciated.

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

Time to create page: 0.123 seconds
Powered by Kunena Forum