Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

change product thumb alt tag

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-17-2013, 11:46 AM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default change product thumb alt tag

I would like a little guidance for tweaking a line of code in product_thumbnail.tpl. I use BCSE easy variant view mod it lists all the variants in a table format for easy image viewing and ordering. The problem is that each variant image pulls the PRODUCT name and puts it into the alt tag. Some of my products have 100 variants, that means that I have the same "alt" tag repeated 100 time on a page... not good for seo.

My solution (unless a better one is offered) is to make the thumbnail image pull the variant name and insert it into the alt tag instead, creating unique alt tags on my product pages.

Here is the orginal code:
Code:
{if $image_y ne 0} height="{$image_y}"{/if} alt="{$product|escape}" style="border: thin solid #ccc" />

Here is what I am trying to do:

Code:
{if $image_y ne 0} height="{$image_y}"{/if} {if $active_modules.Easy_Variant_View and $main eq "product" and $product.product} alt="{$vntopt.option_name|escape}" {else} alt="{$product|escape}"{/if} style="border: thin solid #ccc" />

the line in the bcse_evv.tpl that calls for the thumbnail image is
Code:
{include file="product_thumbnail.tpl" productid=$vntimg_id product=$product.product tmbn_url=$vntimg_url id="bcse-evv-thumb-"|cat:$vntid image_x=$vntimg_thumb_width type=$vntimg_type}

maybe this could be adjusted easier to accomplish what I'm trying to do?

does that look like it makes sense and should work?
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:12 PM.

   

 
X-Cart forums © 2001-2020