I don't have a URL it's on a development server, but if you follow my settings exactly, then you'll see it. You have to have the two settings set the way I have them. I did this will a 100% clean install.
I know what the problem is. Your function that get's all the url GET parameters, is also getting the product_id , and when you build the "buy now" links you're adding the product_id in a second time.
I fixed this problem and an SEO problem at the same time. I'll explain. it's not good to have user actions be simple hyperlinks that spiders can follow, they should be buttons so that the spiders won't follow them. I figured this out after whatching my own search engine spider crawl the site and fetch all these nasty URLS with parameters on it, that it shouldn't even be grabing for example the
buy now button
the tell a friend button
the write a review button
if you have the book type module installed you'll have
the author links
the publisher links
none of these the search spiders should be following, so I'm going through and hastly changing these, I'll write a pretty function later when I have time but what I did was turn all the links into form get requests I'll show you.
PHP Code:
$return_button =
'<form id="notify" name="notify" method="get" action="index.php">
<input name="main_page" type="hidden" value="product_book_info" />
<input name="cPath" type="hidden" value="' . $_GET['cPath'] . '" />
<input name="products_id" type="hidden" value="' . $product_id . '" />
<input name="action" type="hidden" value="notify" />
<input type="submit" value="Notify me" class="notify" />
</form><br/>' . MORE_INFO_TEXT;
If you're wondering where I use this, I use it in place of the "sold" button, so if something is soldout people can click on the product updates link instead. This will help keep the spiders from following links they shouldn't but still sends a get request like a normal link so as not to break the other code that is looking for $_GET's etc. I know there are HTML tags to tell robots not to follow one link or another, but I've found that only some of the robots listen to robots.txt and these other tags and meta tags etc. I don't know of any spider following forms hahaa.
If you know a better way to covert hyperlinks into simple form links let me know.
If you just want to fix the url, you could probably change the zen get all parameter's function so that it strips out the product_id parameter if the action is "buy_now" ? just a guess. But I don't have time to play with that right now.
Bookmarks