News:

AbanteCart v1.4.2 is released.

Main Menu

alt images and order images

Started by ygalbrami, May 11, 2013, 09:50:09 AM

Previous topic - Next topic

ygalbrami

there is a way to put alt in the images?

i need all the items will be the same as the alt
i don't care do change some code to do that.

i very need that for  google SEO.

i need also when i upload images with the name: image-1.jpg, image-2.jpg, image-3.jpg
it will be order by thenumber of the image automatic

how i can make this happend?

thank you

abantecart

You can set alt text in the resource library.
Locate the image and click edit. You need to provide Title to set Alt on the image.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

ygalbrami

I will upload 1000 images to make salt like this will take long long time.

Can you please give me another way?
I need the salt will be the same as the title items
How I can to that with code?

abolabo

Quote from: ygalbrami on May 13, 2013, 12:02:18 AM
I will upload 1000 images to make salt like this will take long long time.

Can you please give me another way?
I need the salt will be the same as the title items
How I can to that with code?

What do you try to paste into title except image's file name?
"Alt" and "title" are textual description of image. It can be changed depending on language of UI.
Another words, text of "alt" attribute is unique for every image.
I don't see automatic method yet.
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

ygalbrami

There is a way but I don't know how or where to edit the code all my  image name by SKU so it need to rename the alt in all the images.

Please I need that code <IMG SRC="<?php echo $image ?"> alt="<?php echo $title ?>">

I will tank you if you can help me with this.

abolabo

open file public_html/storefront/controller/blocks/bestseller.php and add sku into $this->data['products'] array in line 86.
then you can edit tpl with product list, for ex.public_html/storefront/view/default/template/blocks/bestseller_home.tpl
<img src="<?php echo $product['thumb']['thumb_src']?>" alt="<?php echo $product['sku']; ?>">
inside loop.
Note! It's custom solution. We don't recommend use it. Upgrade of cart will rewrite your changes.
Usually we use hook for controllers when build template extension.
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

ygalbrami

#6
ok i did this and i make few changes
your code you give me is WRONG and don't work

this is the correct code, i post it here just to let you know: in bestseller.tpl:
  $item['image'] = '<img src="'.$product['thumb']['thumb_url'].'" alt="'.$product['name'].'">';

this is: $product['thumb']['thumb_url']
and not: $product['thumb']['thumb_src'] as you put here.

in product.tpl is not same code : echo '<img src="'.$image_main[ 'thumb_url'].'" alt="'.$heading_title.'">';

please give us good code next time, thanks

you can locked this as it works.

Forum Rules Code of conduct
AbanteCart.com 2010 -