This is a bit complicated. In version 3.4.0, we added a new option to display products as "thumbnails, with add to cart". If you choose this option, an add to cart button appears below the thumbnails.
Now, it is not always possible to add an item to the cart from a thumbnail view as that view by default does not display product options. If you have product options assigned to a product and you are using this view, we still show the "add to cart" button.
For products that do not have options, clicking the button will submit the form and add the item to the cart. For products that DO have options, because adding to the cart would result in an ugly error like "option XYZ is required", we need to tell Squirrelcart that the product page is being requested for the purpose of displaying options for an add to cart request. The "patc=1" is telling Squirrelcart to do that.
We use that parameter to trigger a more user friendly info message that makes sense, like:
example.png
Google should not be seeing that URL. We remove the ?patc=1 part from the URL for bots, via this code in sc_product():
PHP Code:
// this sets a URL linking to the product, with a parameter at the end to trigger a message telling them to fill out the options
if ($Show_Add_to_Cart) {
if (sc_is_bot()) {
$Pre_Add_to_Cart_URL = $URL; // don't want to hurt ranking with extra crap in URL for a search bot that doesn't need it
} else {
$Pre_Add_to_Cart_URL = strstr($URL,'?') ? $URL.'&patc=1' : $URL.'?patc=1';
}
}
I just tested this on your site. I visited normally, and the add to cart button URL had ?patc=1. I then changed my user agent via a Firefox add-on to match Google's bots, and the URL changed back to the standard product URL.
I did a search in Google for pages on your site with ?patc=1 in the URL, and they are in their index. Not sure why. If you had them in your sitemap file, that would explain it.
You can add rel="nofollow" to the <a /> tag for the add to cart button in the product_thumbnail.tpl.php template file, which may keep Google from following it:
http://www.google.com/support/webmas...y?answer=96569
I've added that for the next version (may not be added until 3.5.0).
In the event that a bot does see the URL and follows it, it would make sense to have a unique page title. I've updated the next release to add that. You can add a hack for yours by adding this to the pre_theme.php file in your custom theme folder:
PHP Code:
if (!empty($_GET['patc'])) $Title .= ' - Choose Options';
That will change the title on those pages to:
Product Name - Choose Options