[Zen Cart] How to add rel="nofollow" meta to external store links?
ichthyous
Joined: 2006-06-16
Posts: 324 |
Posted: Sun, 2007-07-29 16:05 |
Hi there I currently have the Zen Cart integration module installed and I would like to add a nofollow meta tag to the external product links which the module inserts on each photo page. I want the customer to be able to purchase, but I don't want the search engines indexing those pages. How can I insert the rel="nofollow" tag in the url? Thanks for any help |
|
Posts: 8601
search for "<a" in zencart/includes/templates/template_default/templates/tpl_product_gallery_info_display.php. is that it?
Posts: 324
There are a few places where <a href is used. I don't think it would be found in the integration module that you upload to zen cart but in the zen cart module for gallery, but I could be wrong.
Posts: 19
Not quite sure I understand the question. What external product links are inserted other than the links to the gallery images?
The newer versions of Zen Cart handle the obvious noindex, nofollow cases automatically, so a robots.txt file entry may be your easiest option. Something like
Disallow: /index.php?main_page=product_gallery_info
if it is the image links you are referring to.
Rgds,
Posts: 324
I am referring to the links that the zen cart integration module places on each Gallery photo page so you can checkout through Zen Cart. On my site I have changed the link to read "Purchase a fine art print of this photo"...see here:
http://andrewprokos.com/photos/architecture/guggenheim-nyc-interior/
I want to add a nofollow tag to those links
Thanks!
Posts: 8601
look at function getItemLinks in module.inc
change:
to:
Posts: 324
Ok added the code and uploaded the new module.inc file, but for some reason the link is still not showing the nofollow tag. I flushed the template cache and still no change. Is there something I am missing?
Posts: 8601
I don't use this module, so I really have no idea what link you're talking about.. just looking in the code for where links are created. Maybe this isn't the right one.. what file did you put "Purchase a fine art print of this photo" in??
Posts: 324
The module.inc page is correct, but the no follow tag is getting entered in the wrong place. Here is a url from one of the product links:
http://andrewprokos.com/?g2_controller=zencart.PurchaseOptions&g2_attrs=rel%3D%22nofollow%22&g2_itemId=1274&g2_return=%2Fphotos%2Fwashington-dc%2Fus-capitol-spring%2F%3F&&g2_returnName=photo
It's getting embedded in the link url itself for some reason
Thanks
Posts: 1642
Why not use the more straightforward robots.txt way mentioned?
"Disallow: /store/?main_page=product_gallery_info*" in robots.txt will do the job of stopping the product info page from getting indexed.
If you don't want the store to be indexed at all, then use "Disallow: /store*".
Both without the quotation marks as you probably know.
.
Gallery version = 2.2.2
Default theme = PGtheme 1.3.0
Web Site: dakanji.com
Posts: 324
I don't want to disallow the store's pages from being indexed, just to stop the outbound link on the gallery photo page from being counted.
Thanks
Posts: 1642
Not sure I fully understand. Is it that you don't mind "/store/?main_page=product_gallery_info&xyz&etc" to be indexed as long as the robot doesn't get there by following a link from your gallery?
.
Gallery version = 2.2.2
Default theme = PGtheme 1.3.0
Web Site: dakanji.com
Posts: 324
Yes, I don't want the spider finding the store page from the gallery page...the problem is that the metas are so similar that it's being seen as two copies of the same page and I am having duplicate content issues. I want to add a nofollow tag to the link so that google will stop finding those store pages. Thanks
Andrew
Andrew Prokos NYC Fine Art Photography
Posts: 8601
If you got attrs in the URL then it sounds like you put it in the 'params' array instead of in the outer array. if the code is right, then maybe attrs only works with current svn / nightly snapshot.. I don't recall when that was added.
Posts: 324
Oh I see, yes my version may be getting outdated Thanks