pablogrk Posted September 10, 2013 Share Posted September 10, 2013 Hola, estoy buscando la forma para cambiar el atributo ALT en las imágenes de los productos. ¿Hay alguna forma? He visto por ahí que mucha gente recurre a cambiar en el .tpl de productos el alt que lo coge del titulo del producto, pero a mi ni siquiera, me coge la URL del producto. ¿Alguna sugerencia? Gracias Link to comment Share on other sites More sharing options...
belliblo Posted October 23, 2013 Share Posted October 23, 2013 Tengo la misma duda, has podido solucionarlo? Gracias! Link to comment Share on other sites More sharing options...
ventura Posted October 23, 2013 Share Posted October 23, 2013 Para poder ayudarte hace falta saber que codigo tienes en el product.tpl ó que no des dirección de la web Link to comment Share on other sites More sharing options...
belliblo Posted October 24, 2013 Share Posted October 24, 2013 Hola! gracias por responder. Te refieres a este codigo que pego abajo? el template es http://addons.prestashop.com/demo/FO6624.html Gracias! <!-- right infos--> <div id="pb-right-column" {if isset($images) && count($images) < 2}class="no_thumbs"{/if}> <!-- product img--><div class="clearfix"> <div id="image-block"> {if $have_image} <span id="view_full_size">{if $product->new}<span class="new">{l s='New'}</span>{/if} {if $product->on_sale} <span class="discount {if $product->new}discount2{/if}">{l s='On sale!'}</span> {elseif $product->specificPrice AND $product->specificPrice.reduction AND $productPriceWithoutReduction > $productPrice} <span class="discount {if $product->new}discount2{/if}">{l s='Reduced price!'}</span> {/if} <img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')}" {if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox_default')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic" /> <span class="span_link">{l s='View full size'}</span> </span> {else} <span id="view_full_size">{if $product->new}<span class="new">{l s='New'}</span>{/if} {if $product->on_sale} <span class="discount {if $product->new}discount2{/if}">{l s='On sale!'}</span> {elseif $product->specificPrice AND $product->specificPrice.reduction AND $productPriceWithoutReduction > $productPrice} <span class="discount {if $product->new}discount2{/if}">{l s='Reduced price!'}</span> {/if} <img src="{$img_prod_dir}{$lang_iso}-default-large.jpg" id="bigpic" alt="" title="{$product->name|escape:'htmlall':'UTF-8'}" /> <span class="span_link">{l s='View full size'}</span> </span> {/if} </div> {if isset($images) && count($images) > 0} <!-- thumbnails --> <div id="views_block" class="clearfix {if isset($images) && count($images) < 2}hidden{/if}"> {if isset($images) && count($images) > 3}<span class="view_scroll_spacer"><a id="view_scroll_left" class="hidden" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">{l s='Previous'}</a></span>{/if} <div id="thumbs_list"> <ul id="thumbs_list_frame"> {if isset($images)} {foreach from=$images item=image name=thumbnails} {assign var=imageIds value="`$product->id`-`$image.id_image`"} <li id="thumbnail_{$image.id_image}"> <a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')}" rel="other-views" class="thickbox {if $smarty.foreach.thumbnails.first}shown{/if}" title="{$image.legend|htmlspecialchars}"> <img id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'medium_default')}" alt="{$image.legend|htmlspecialchars}" /> </a> </li> {/foreach} {/if} </ul> </div> {if isset($images) && count($images) > 3}<a id="view_scroll_right" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">{l s='Next'}</a>{/if} </div> {/if}</div> <div {if isset($images) && count($images) > 1}class="links_margin" {else} class="links_margin_top" {/if}> {if isset($images) && count($images) > 1}<p class="resetimg clear"><span id="wrapResetImages" style="display: none;"><img src="{$img_dir}icon/cancel_11x13.gif" alt="{l s='Cancel'}" width="11" height="13"/> <a id="resetImages" href="{$link->getProductLink($product)}" onclick="$('span#wrapResetImages').hide('slow');return (false);">{l s='Display all pictures'}</a></span></p>{/if} Link to comment Share on other sites More sharing options...
Recommended Posts