X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   "Alt" text keyword hack. (https://forum.x-cart.com/showthread.php?t=4266)

pipercub 09-07-2003 08:14 AM

"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

dealsondeals 09-07-2003 09:46 AM

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

Regards,

Glen

Dlee 09-08-2003 08:30 AM

Beautiful job! Nicely done. :D

wild boar 09-24-2003 08:37 PM

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}

DogByteMan 09-24-2003 09:03 PM

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.

wild boar 09-24-2003 09:08 PM

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...

jpsowin 09-24-2003 09:11 PM

This will also make people with images turned off hate you :lol:

wild boar 09-24-2003 09:16 PM

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!!

DogByteMan 09-24-2003 09:18 PM

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

wild boar 09-24-2003 09:21 PM

it's like looking in a playboy with the pictures cut out.. useless.. :D

jpsowin 09-24-2003 09:28 PM

I suppose, except the rise of PDAs and Cell Phones.... 8O
I guess it just depends if you want a site accessible to everyone or just those people with ______ .

DogByteMan 09-24-2003 09:33 PM

Now Joshua, that is sort of like still designing for 640x480. It can be done.... But Why? I don't think x-cart in itself would be friendly to PDA users so i don't think it'll cause a huge loss of customers, besides, yo can see images in a PDA.

wild boar 09-24-2003 09:37 PM

I design my pages with a max of 765..


unless it's liquid design, like the default x-cart.. but I don't like the looks at it.. so I changed the width down

Besides, even with people with disabilities.. if they can't see, then it'll still read the text to them what the alt= tag says..

people with cell phones and stuff.. it costs like 2 dollars minute for that crap..

and I don't see surfing with a pda will ever make it.. except for checking email

I don't design sites for pda or anything because the hits you would get from a pda are like .000004

jpsowin 09-24-2003 09:38 PM

I agree, I'm just thinking about forward and cross-compatibility. I am finishing up a complete CSS/XHTML rehaul of my big store which will accomplish that, so I suppose it's all in your priorities. I don't want to miss a sale if I can help it! I also know that google considers keyword spamming image alt tags as a no no.... and I'm not taking chances to get hit with the big fat PageRank 0 penalty!

Content is king with the search engines, and it's pretty hard to trick them these days without being caught quick and being sorry for a long time. Good optimization combined with good content produces excellent results!

(and BTW, I use my cell to surf sometimes, and it's not expensive at all. In fact, with Verizon, I can use my regular minutes as internet time---on weekends---yep, it's free :D )

wild boar 09-24-2003 09:45 PM

well, you have a good deal on internet rates with your cell..

I'm with firstcellular.. a local one around here.. I was with sprint.. and for like 2 minutes of internet time cost me 5 dollars.. I was like no way.

I'll stick with text messaging.. only 2 cents a piece.. works for me!

Good luck with your CSS/XHTML site, I'm happy for you, as I haven't learned xhtml..

and CSS/XHTML is the future of accesiblity.. so your site should do very well..

when it's done or if it's done, give me the link, I'd like to see it..

pipercub 09-25-2003 03:43 AM

Joshua,

I know that you're (for lack of a better term) playing devils advocate (this is a compliment) here and I (we) certanly appreciate a look at the potential cons of this mod. ;)

X-cart already has the ability to place the product name in the alt tag. This mod only adds the appropriate category name to that tag. As far as users with images off seeing long lines of text, this is not the case (unless your cat names and product names are super long). By xcart default, the user would see "Widget" in place of the image. With this mod, they would see "Utilities Widget". This surly is not a long string of text.

Also, It's hard to say exactly what search engines consider as alt text spamming. I don't see this as spam because it's _relavent_ to the product and category. However, if the mod was set to trick or deceive by producing reslults like "FREE Cellphones Widget", where "Free Cellphones" is not related to "Widget" at all, then I could see a problem with spamming.

Piper

parmar 09-25-2003 11:50 PM

Pipercub..

Great little mod. Just one question. I have put few bits of text with my images already. I pressume this will replace all those text already.

pipercub 09-26-2003 04:35 AM

Quote:

Originally Posted by parmar
Pipercub..

Great little mod. Just one question. I have put few bits of text with my images already. I pressume this will replace all those text already.


I checked your site and I didn't see any additional text associated with your product images (other than the default xcart alt text). Which images did you add alt text to? This mod only affects thumbnail images (as specified in product_thumbnail.tpl). Are you talking about other images on your site such as your logo image? I guess I'm a little confused. :?

Piper

edwardc 10-07-2003 07:16 PM

thanks, work great!

PersonalizedFitness 03-14-2005 09:46 AM

I like this small modification ... Thanks! :)

salsabeel 04-01-2006 01:34 PM

Would it be good for SEO to add the title tag in the image too?

For example:

title="{$product|escape}"

intel352 04-03-2006 10:05 AM

this article suggests that title tags aren't needed/used for images, but are good for urls, tables, etc...

http://www.netmechanic.com/news/vol6/html_no1.htm


All times are GMT -8. The time now is 02:45 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.