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

"Alt" text keyword hack.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 09-07-2003, 08:14 AM
 
pipercub pipercub is offline
 

Advanced Member
  
Join Date: Oct 2002
Posts: 82
 

Default "Alt" text keyword hack.

I wanted to make my <img alt="xxx"> text more keyword rich. The default xcart alt text is the product name, but sometimes the product name does not contain any keywords. So, I pasted in a line of code that also includes the current category name (which should be one of your keywords). The new code will display the alt text as:

alt="Category Name Product Name"

replace your current "product_thumbnail.tpl" with this code

Code:
{if $config.Appearance.show_thumbnails eq "Y"}[img]{if $tmbn_url}{$tmbn_url}{else}{if $full_url}{$http_location}{else}..{/if}/image.php?productid={$productid}{if $file_upload_data.file_path}&tmp=y{/if}{/if}[/img]{/if}

Now, the search engines will see extra keywords for every product thumbnail on your page! This really saturates your category pages.

Piper
Reply With Quote
  #2  
Old 09-07-2003, 09:46 AM
 
dealsondeals dealsondeals is offline
 

eXpert
  
Join Date: Dec 2002
Location: Dallas, Texas, USA
Posts: 231
 

Default

Nice job! Haven't implemented yet, but look forward to putting it to use.

Regards,

Glen
__________________
Never understimate stupidity.
--------
X-Cart Version: 3.5.2
Hosting:mind-in-design.net
Configuration: Virtual Dedicated Server || Intel Pentium 4 2.4 GHZ CPU || 1024MB PC2100 DDR RAM || Linux || PHP 4.3.2 || MySQL server 4.0.14
Reply With Quote
  #3  
Old 09-08-2003, 08:30 AM
 
Dlee Dlee is offline
 

Member
  
Join Date: Jan 2003
Location: Grand Prairie, TEXAS
Posts: 22
 

Default

Beautiful job! Nicely done.
Reply With Quote
  #4  
Old 09-24-2003, 08:37 PM
 
wild boar wild boar is offline
 

Advanced Member
  
Join Date: Sep 2003
Posts: 88
 

Default

I guess this mod was already fixed in the newest version?

My thumbnail tpl has this in it

{* $Id: product_thumbnail.tpl,v 1.8.2.1 2003/05/20 13:32:38 svowl Exp $ *}
{if $config.Appearance.show_thumbnails eq "Y"}[img]{if $tmbn_url}{$tmbn_url}{else}{if $full_url}{$http_location}{else}..{/if}/image.php?productid={$productid}{if $file_upload_data.file_path}&tmp=y{/if}{/if}[/img]{/if}
__________________
hi
Reply With Quote
  #5  
Old 09-24-2003, 09:03 PM
  DogByteMan's Avatar 
DogByteMan DogByteMan is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 833
 

Default

Not exactly... the code in this topic is to add the category name to the alt tag as well as the product name. This is a good thing when it comes to the search engines.
__________________
Dedicated Server provided by EWD Hosting
X-Cart version 4.1.12
PHP 5.3.2
MySQL server 5.0.87-community
Operation system Linux
Perl 5.008008
dogbytecomputer.com
Reply With Quote
  #6  
Old 09-24-2003, 09:08 PM
 
wild boar wild boar is offline
 

Advanced Member
  
Join Date: Sep 2003
Posts: 88
 

Default

I wasn't for sure, as alot of people are using the 3.6 or whatever version and I wasn't sure if this was already done in the new version..

thanks, I'll add the code

By the way, as were talking about search engines..

as you can see I installed the cart at

shop/customer

when my site is finished, I will redirect the main page to shop/customer via htacess

Will this affect my rankings? I haven't gotten a chance to read up on the search engine forum, but thought I'd ask...
__________________
hi
Reply With Quote
  #7  
Old 09-24-2003, 09:11 PM
 
jpsowin jpsowin is offline
 

X-Adept
  
Join Date: Sep 2002
Posts: 459
 

Default

This will also make people with images turned off hate you
__________________
Joshua Sowin
...taking things one TPL at a time.
Reply With Quote
  #8  
Old 09-24-2003, 09:16 PM
 
wild boar wild boar is offline
 

Advanced Member
  
Join Date: Sep 2003
Posts: 88
 

Default

lol because instead of an image it would be like a big line of text?

I don't know anyone that turns their images off these days anyways.. Especially when shopping on the internet.. you got to see what your buying!!
__________________
hi
Reply With Quote
  #9  
Old 09-24-2003, 09:18 PM
  DogByteMan's Avatar 
DogByteMan DogByteMan is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 833
 

Default

Quote:
Originally Posted by wild boar
lol because instead of an image it would be like a big line of text?

I don't know anyone that turns their images off these days anyways.. Especially when shopping on the internet.. you got to see what your buying!!

I'll second that
__________________
Dedicated Server provided by EWD Hosting
X-Cart version 4.1.12
PHP 5.3.2
MySQL server 5.0.87-community
Operation system Linux
Perl 5.008008
dogbytecomputer.com
Reply With Quote
  #10  
Old 09-24-2003, 09:21 PM
 
wild boar wild boar is offline
 

Advanced Member
  
Join Date: Sep 2003
Posts: 88
 

Default

it's like looking in a playboy with the pictures cut out.. useless..
__________________
hi
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:23 AM.

   

 
X-Cart forums © 2001-2020