Jump to content

[FREE Module] Google Rich Snippets and Breadcrumbs!


Recommended Posts

  • 5 weeks later...

Hi Desmod,

 

can you upload your psrichsnippets.php, please?

 

did you solve the missing url path?

 

thank you

 

 

  Hello,

In this line you can not put the url
on file
psrichsnippets.php

 

$path = '<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title" and itemprop:"ul">'.$path.'</span></span>';   (or this code  "$product.link|escape:'html':'UTF-8'}"

 

or add this patht:

 

before:

return $full_path.$path

 

if ($path) {
$item = $full_path . "<li class="lastItem"><a href="javascript:;">" . $path . "</a></li>";
} else {
$item = "<li class="lastItem"><a href="javascript:;">" . $full_path . "</a></li>" . $path;
}
return $item;

 

Sry i want to help byt i am bad programmer

Share this post


Link to post
Share on other sites

If you use 1.6.0.14 fixing the module won't work, because recently prestashop added its own crumbs

So for that version you don't need my module. In any case, to fix it in the module replace this, at line 132

 

$path = '<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title">'.$path.'</span></span>';

with

$path = '<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a itemprop="url" href="'.Context::getContext()->link->getProductLink((int)Tools::getValue('id_product')).'"><span itemprop="title">'.$path.'</span></a></span>';

Seems to be working. COnfirm if you can, so I can implement the fix

  • Like 1

Share this post


Link to post
Share on other sites

Nemo1, your a star  works a treat

 

on a side note do you know how to add  other markup to the module like gtin13 long description  ect and if the Summary box can be moved yo another tab on the product page?

 

Image shows the fix you advised.

 

post-380599-0-54646700-1434852147_thumb.png

 

oh on another product the path is > Small Animal>Small Animal Food>Ferret Food>Ferret Complete 2kg

 

breadcrumbs shows the below is that correct was thinking it should show all 5 steps  however am well happy there is no errors

 

 

post-380599-0-63894800-1434852450_thumb.png

Edited by killeer (see edit history)

Share this post


Link to post
Share on other sites

hi

 

more info on this, in the back office the above item was shown in the category HOME even tho the item is in the sub cat Ferret Food, the association in the product page shows Ferret Food.

 

 however if i added the product to home as well the full path showed on the product page and the breadcrum. this means to have all products showing the full breadcrum then they need to be in HOME and the sub category

 

 

post-380599-0-61218900-1434990919_thumb.jpg

Share this post


Link to post
Share on other sites

Hey, thanks for the feedback :)
Actually to add more info you just have to know the itemprop, then from the php file assign the variable you need (given it's in prestashop already, otherwise it's a whole other struggle), and finally display it in the template

  • Like 1

Share this post


Link to post
Share on other sites

If you use 1.6.0.14 fixing the module won't work, because recently prestashop added its own crumbs

So for that version you don't need my module. In any case, to fix it in the module replace this, at line 132

 

$path = '<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title">'.$path.'</span></span>';

 

with

$path = '<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a itemprop="url" href="'.Context::getContext()->link->getProductLink((int)Tools::getValue('id_product')).'"><span itemprop="title">'.$path.'</span></a></span>';

 

Seems to be working. COnfirm if you can, so I can implement the fix

 

Hi Nemo

Thank you for this wonderful free module,,

I am also getting the url error,, Can you please tell me in which file do i need to apply the mentioned fix,, When I do it it the psrichsnippets.php ,, i get an error & my product pages stop working, PS 1.6.0.6

Rest all is working fine

Share this post


Link to post
Share on other sites

If you use 1.6.0.14 fixing the module won't work, because recently prestashop added its own crumbs

So for that version you don't need my module. In any case, to fix it in the module replace this, at line 132

 

$path = '<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title">'.$path.'</span></span>';

 

with

$path = '<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a itemprop="url" href="'.Context::getContext()->link->getProductLink((int)Tools::getValue('id_product')).'"><span itemprop="title">'.$path.'</span></a></span>';

 

Seems to be working. COnfirm if you can, so I can implement the fix

 

Hello Nemo1,

 

Thank you very much for the module and this modification, it works like a charm with PS 1.5.4.1.

 

Is it possible to have breadcrumbs for category too or is it reserved for products ?

 

Another question, the module use data-vocabulary.org but now Google advise JSON-LD code with schema.org, is is hard to modify that way ?

 

Thanks in advance.

Edited by KevinNash (see edit history)

Share this post


Link to post
Share on other sites
  • 3 weeks later...
  • 3 weeks later...

Thank you for the module. I was using it for breadcrumbs before but I have upgraded to 1.6.1 so I discontinued use.

 

Is there any value in using the module with 1.6.1 or does PrestaShop now handle everything out of the box?

Share this post


Link to post
Share on other sites

Hi Nemo1 Module is very nice...

 

I installed few weeks ago and waited for long to see my website according to this module.

 

But last night I was trying to Fetch And Validateing my Pages @ Structured Data Testing Tool

Here I found an Error :-

 

Edited by sinnights (see edit history)

Share this post


Link to post
Share on other sites

How many weeks? The module has been updated to fix that.
Apart from that, it might be coming from prestashop too, see if your template is using rich crumbs

Share this post


Link to post
Share on other sites

Hi Nemo1 Thanks for replying...I installed this module on May month and I like this module very much but I am not getting output as Google is not displaying my pages according to this module.

 

My Prestashop version is 1.5.6.2 I dont know about rich crumbs

 

Thanks in advance

Share this post


Link to post
Share on other sites

Hey Nemo1, I have had the same Problem and I found out, that your module that I downloaded here:

 

http://store.nemops.com/free-modules/34-prestashop-google-rich-snippets-breadcrumbs.html#.VdyVAs5Yqzm

 

isn't fixed yet. After I fixed it like you descriped here, google didn't found an error anymore.

 

So @ sinnsight maybe that could be also your solution.

 

Matt

Edited by Tupsta (see edit history)

Share this post


Link to post
Share on other sites

I tested it now with https://developers.google.com/structured-data/testing-tool/ and google says everything is allright.

 

BUT I found another problem. At every productpage after the products description, I see now the following:

 

 

Summary
  • Product Name: Productname
  • Product Reference: 3042
  • By Brand XY
  • Price: 16,56
  • Product Width: 0.00 cm
  • Product Height: 0.00 cm
  • Product Depth: 0.00 cm
  • Product Weight: 0.00 kg
  • Rating: 5/5 based on 1 user ratings
  • Description:

 

But shouldn't this be hidden? I think this is not meant to be seen for the customer. How can I change it in that way, that this is hidden for the visitor of my website but not for google?

 

Thanks in advance for your answer.

 

Matt

Share this post


Link to post
Share on other sites

Greetings everyone,

I have a PS 1.6.1, I have error in rich snippets, I need your help.

 

Test in Google Rich Snippets Tools

https://developers.google.com/structured-data/testing-tool/

My store
https://www.maisvitaminas.com.br/fitoterapicos/endurox-excel-60-comprimidos

 

 

 

I've read some tutorials, plus some lines look different, and I want to make sure that I'm moving in the right line

post-42069-0-57498600-1441225297_thumb.jpg

Share this post


Link to post
Share on other sites
  • 3 months later...

hi nemo, this is a code from prestashop demo 1.6.1.3

<div class="breadcrumb clearfix">
    <a title="Return to Home" href="http://fo.demo.prestashop.com/" class="home"><i class="icon-home"></i></a>
            <span class="navigation-pipe">></span>
                    <span class="navigation_page"><span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope=""><a title="Women" href="http://fo.demo.prestashop.com/en/3-women" itemprop="url"><span itemprop="title">Women</span></a></span><span class="navigation-pipe">></span><span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope=""><a title="Dresses" href="http://fo.demo.prestashop.com/en/8-dresses" itemprop="url"><span itemprop="title">Dresses</span></a></span><span class="navigation-pipe">></span>Casual Dresses</span>
            </div>

result in google (attach image)

 

is correct ? not is misssing link of the home ?

post-341341-0-13265600-1450193089_thumb.jpg

Share this post


Link to post
Share on other sites
  • 1 month later...

Yes, the new default theme already has snippets and crumbs

 

Is this feature integrated in the main preatashop code, Nemo?

I have searched the modules page for anything with "rich snippets" but can't see anything.

Share this post


Link to post
Share on other sites
  • 4 weeks later...

Hi

Thanks for this module.

I'm on a 1.6 installation, but I thought I would install this as I wasnt having any luck with the native snippets.

 

Should your module update the itemprop price when an attribute/combination is selected?  I'm not seeing any change in the pricing either on this or in the native snippets.

 

Also, my websites prices are predominantly displayed without VAT, but with a VAT incl price also displayed.  The itemprop price always seems to default to the exc vat price, which google doesnt like.

 

Can you offer any insights as to my options here?  thanks

Share this post


Link to post
Share on other sites

hi nemo thanks for the module

i have one problem

the rich snippet testing tool is showing error in breadcrumbs

without your module installed i had product snippet and it was getting indexed properly  but i wanted the breadcrumb too. so i installed your module but the breadcrumb is not working properly . its not getting the url of the product page itself 

 

could you please fix this

ps v 1.5.4.1 theme megashop

 

Also whats the use of summary tab. How your module enables the google rich snippet without having any reviews of products ? as i have installed yotpo for google rich snippet. so i guess its already there. i just want the breadcrumbs. 

So can i remove the summary tab too ?

post-381543-0-31226400-1457067740_thumb.png

Share this post


Link to post
Share on other sites

If you have native snippets, they will conflict with my module, so they have to be removed first.
As for the breadcrumbs, I never found the time to update the file, it's just about adding the url property to the last item of the crumbs.
The summary tab is needed to add the snippets to a theme that doesn't have them, as you can't obviously edit other parts of it.
Mine should consider reviews from the standard module only, so it won't likely be compatible with yotpo (I never tested it)

Share this post


Link to post
Share on other sites

ok so can u tell me how to remove the default rich snippet code from the store. I havent found any modules to disable them. i guess they are embedded by default in newest prestashop version.

Also did u mean the products comment as standard review module to work for your rich snippet module ?

Share this post


Link to post
Share on other sites

Look for entities with itemscope or itemprop and get rid of those properties. They are embedded in product.tpl, theme folder.

Anyway yeah at least it worked till last time I tested it

Share this post


Link to post
Share on other sites
  • 2 weeks later...

i read there is a new version but when i download i still have the same one (17.05.214) with same issue for breadcrumb product url.

 

I read the topic and i dont understand.. how could i do to solve this issue ?

Share this post


Link to post
Share on other sites
  • 4 weeks later...

Hello,

 

Thanks for the module.  Is there anyway to have the price set properly for the different combinations and variations?  Currently the offer price is for the default combination, so if you're looking at a combination then the price is wrong.  When you validate it via google structured testing tool it is showing the default combination price.  Google complains about this.. google shopping complains about it.. when they browse to get the price they see the wrong price.  Is there a fix for this already? if not can you direct me to where to look and how to fix this please.

 

Thanks!

Share this post


Link to post
Share on other sites

There is no fix. The combination price is set with javascript, while the base price is set at render time. THerefore, unless google crawls the site after javascript is loaded and you trigger a modification of the og: metas with javascript, no, there is no way I am aware of 

Share this post


Link to post
Share on other sites

Hi Nemo,

 

Thanks for the reply.   Got it.. so you think even though the combination is in the URL.. i.e.  xxx#/length-16  there's no way to read that and set the og:metas at render time?  of course not after the page is loaded but it somebody goes directly to a page with the combination parameter in the URL.   I'm not sure if google waits till js is loaded or not but it's worth a try.. they're getting pretty good at reading js and other things.. can you give me an example code of modifying one of the og:metas to set the right combination please.. I'm assuming the js you're referring to would be in the product.js file.

 

I believe at some point they're going to require all this data be available via microdata.. so if it's not done correctly and showing the right information the who cares if you have it or not :)

 

By require I mean for example if you want to advertise with them i.e. google shopping.

 

BTW I'm on 1.5.6

 

Thank you.

Share this post


Link to post
Share on other sites
  • 1 month later...

Hi Nemo,

 

I installed the module, but nothing seems to happen. I unchecked the breadcrumbs only option but that didn't make a difference. I don't see the  "summary" tab that was mentioned in one of the posts and on the website pages nothing seems to have been changed.

 

See for example

https://www.topsnoep.nl/schepsnoep/5444-winegums-cci-kilo.html

 

Any ideas?

Share this post


Link to post
Share on other sites
  • 2 weeks later...

Dear Nemo- Is there any update to end URL issue? I am on 1.6 but neither bootstrap nor your module helps resolve Structured data tool error with last URL.

Share this post


Link to post
Share on other sites
  • 2 months later...
  • 2 months later...
  • 1 month later...

Hello! I need to do rating system as you can seen on this screenshot:

7EBwR19.png

At this point i download this module for my prestashop 1.6.0.9.

Now, what i want to do to get decision for my task?

Thank you and sorry for my english =)

Share this post


Link to post
Share on other sites
  • 2 months later...
  • 4 months later...
  • 1 month later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More