SuperCharlie Posted September 2, 2012 Share Posted September 2, 2012 I have been working through bumping up my googleness and found that google wasnt really displaying my products like I wanted since the template I use isnt real google friendly for general organic searches. I noticed some sites had the prices and other things right in the listing and then ran across Rich Snippets which basically tells google the basic product information which they then display in a much more pleasant way. Here is the how-to link at google help.. notice the search listing image at the top..yea..thats the stuff. https://support.goog...n&answer=146750 So basically you take your theme/product.tpl and insert the google special sauce within the tags. You start by wrapping the whole product info area with a special div..like this.. <div itemscope itemtype="http://data-vocabulary.org/Product"> ..all your product info yada yada yada </div> Then, you dig around for the info you want to include like the product name, price, description, image, etc.. and **insert** some tags so google can read it..like this.. <h1>{$product->name|escape:'htmlall':'UTF-8'}</h1> becomes <h1 itemprop="name">{$product->name|escape:'htmlall':'UTF-8'}</h1> So you make your way down the product.tpl inserting the specific tags inside your divs and spans or any tag apparently since the H1 worked for me as well. Once you get it the way you want, you can test it in their spiffy little tool by doing a view source and pasting the whole mess here.. http://www.google.co...ls/richsnippets And it will show you what your markup will look like in a search listing. It wont show up immediately as they will have to re-crawl you first, but once it does, you should have some much prettier search listings. And now..you know SC 2 Link to comment Share on other sites More sharing options...
lain Posted September 2, 2012 Share Posted September 2, 2012 thanks for the info Link to comment Share on other sites More sharing options...
RalfP Posted September 3, 2012 Share Posted September 3, 2012 Could you tell on wich line you start with the following line: <div itemscope itemtype="http://data-vocabulary.org/Product"> The testing tool will constantly tell that there is no rich snippet markup. Evenly when i manually force a compile. Thank you. Link to comment Share on other sites More sharing options...
SuperCharlie Posted September 4, 2012 Author Share Posted September 4, 2012 @ RalfP I think it is going to be different for different themes. I use a heavily moified clothestheme I found online. I think the key is to make sure you wrap your entire content area and make sure to put the closing </div> and be careful not to put either within an if statement that might not process. Do a force compile and do a view source to make sure the changes are there. If not, you might need to clear your PrestaShop cache files. For what its worth.. here is my lines 121-124 where I start the markup {include file="$tpl_dir./breadcrumb.tpl"} <div itemscope itemtype="http://data-vocabulary.org/Product"> <div id="primary_block" class="clearfix"> <h1 itemprop="name">{$product->name|escape:'htmlall':'UTF-8'}</h1> And I put the closing </div> at the very end of the file. Good luck SC Link to comment Share on other sites More sharing options...
mateigogu Posted October 5, 2012 Share Posted October 5, 2012 Thank you a lot for the info, i just implemented. Hope i get a good result. Thank You again Link to comment Share on other sites More sharing options...
Fortega Posted December 21, 2012 Share Posted December 21, 2012 For what its worth.. here is my lines 121-124 where I start the markup {include file="$tpl_dir./breadcrumb.tpl"} <div itemscope itemtype="http://data-vocabulary.org/Product"> <div id="primary_block" class="clearfix"> <h1 itemprop="name">{$product->name|escape:'htmlall':'UTF-8'}</h1> And I put the closing </div> at the very end of the file. Good luck SC I added the itemProp attribute to my 'primary_block' div, and it seems to work as well: <div id="primary_block" class="clearfix" itemscope itemtype="http://data-vocabulary.org/Product"> Link to comment Share on other sites More sharing options...
Dh42 Posted December 21, 2012 Share Posted December 21, 2012 You can check this out too. http://blog.dh42.com/prestashop-and-google-rich-snippets/ 1 Link to comment Share on other sites More sharing options...
NemoPS Posted December 21, 2012 Share Posted December 21, 2012 Adding my .02 here http://nemops.com/prestashop-google-rich-snippets/ Link to comment Share on other sites More sharing options...
seog Posted December 31, 2012 Share Posted December 31, 2012 Adding my .02 here http://nemops.com/pr...-rich-snippets/ Excelent guide, I tried add product image for display in rich snippet tool but this don´t work. I put product image code in product.tpl as: <img itemprop="image" src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')}" {if="" $jqzoomenabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox_default')}" {else}="" title="{$product->name|escape:'htmlall':'UTF-8'}" {="" if}="" id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}"> Perhaps it don´t work because I have a module of productrating with other google rich code and creates conflict with the two codes? i have on other module this code: <span class="hreview-aggregate" style="display: none !important;"> <span class="item"> <span class="fn">{$product->name}</span> </span>, <span class="rating"> <span class="average">{$allratings}</span> out of <span class="best">{$maxunit}</span> based on <span class="votes">{$votes}</span> ratings <span class="summary"></span> </span> </span> best regards Link to comment Share on other sites More sharing options...
Dh42 Posted December 31, 2012 Share Posted December 31, 2012 Do you have a link to your site. It would be easier to test out that way and see what might be wrong. Link to comment Share on other sites More sharing options...
seog Posted December 31, 2012 Share Posted December 31, 2012 (edited) Do you have a link to your site. It would be easier to test out that way and see what might be wrong. Hi Dh42 I attach google rich tool with link of product preview: http://www.google.co...3Dproduct&html= and product url is: http://../index.php?id_product=1&controller=product This is my site test, don´t is final web thanks very much Edited March 12, 2013 by seog (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts