schema.org missing markup
-
- Commander (CMDR)
- Posts: 139
- Joined: Wed Mar 31, 2010 8:59 pm
schema.org missing markup
I used Google's structured data tool to see why google says we have errors in the markup. My product page has 2 issues:
1. The "price" markup is including the $. The markup should just show "10.00" for price, instead it says "$10.00". The test shows this error:
price - $33.95 (The property $33.95 is not a valid price specification. Learn more about http://schema.org/price.)
Here is the error in the code the test points to:
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span itemprop="price">
$33.95
</span>
2. The more serious of issues is the markup for "name" is missing all together. The test shows this error:
Here is the error in the code the test points to:
name A value for the name field is required. Then they show me the code I guess where it belongs?
<div id="productPage" class="mainContentWrapper" itemtype="http://schema.org/Product" itemscope>
Can someone point me to where in the code I'd go to try to fix this?
Thanks
Barb
1. The "price" markup is including the $. The markup should just show "10.00" for price, instead it says "$10.00". The test shows this error:
price - $33.95 (The property $33.95 is not a valid price specification. Learn more about http://schema.org/price.)
Here is the error in the code the test points to:
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span itemprop="price">
$33.95
</span>
2. The more serious of issues is the markup for "name" is missing all together. The test shows this error:
Here is the error in the code the test points to:
name A value for the name field is required. Then they show me the code I guess where it belongs?
<div id="productPage" class="mainContentWrapper" itemtype="http://schema.org/Product" itemscope>
Can someone point me to where in the code I'd go to try to fix this?
Thanks
Barb
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: schema.org missing markup
For price, I have changed code like basePriceWithVAT.LSCurrencyFormat("ulc") to basePriceWithVAT.ToString("F2") in the .cs file then put a $ in the .ascx file before the <span itemprop="price"> so that it isn't picked up in the microdata in the BuyProductDialog . In ProductPage.ascx, the product name label should include itemprop="name" like it comes in AC default code. <asp:Label ID="ProductName" runat="server" EnableViewState="false" itemprop="name"></asp:Label>
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
-
- Commander (CMDR)
- Posts: 139
- Joined: Wed Mar 31, 2010 8:59 pm
Re: schema.org missing markup
Hi Judy!
Thanks for that info. Interestingly that line of code IS in my ProductPage.ascx, identical to the line you showed, other than it is wrapped in an H1 tag.
<h1><asp:Label ID="ProductName" runat="server" EnableViewState="false" itemprop="name"></asp:Label></h1>
Any other thoughts?
Thanks for that info. Interestingly that line of code IS in my ProductPage.ascx, identical to the line you showed, other than it is wrapped in an H1 tag.
<h1><asp:Label ID="ProductName" runat="server" EnableViewState="false" itemprop="name"></asp:Label></h1>
Any other thoughts?
-
- Commander (CMDR)
- Posts: 139
- Joined: Wed Mar 31, 2010 8:59 pm
Re: schema.org missing markup
Viewing source for one of my product pages it looks like maybe the "itemprop" needs to be inside the line with the H1 tag? I have no idea where to find that.
<div id="ctl00_ctl00_NestedMaster_PageHeader_StoreHeader_H_PageCaption" class="row captionCantainer">
<div class="col-md-6">
<h1 style="font-size:28px; color:#032834;font-family:'Bitter',serif;margin:5px 0;"><span id="ctl00_ctl00_NestedMaster_PageHeader_StoreHeader_H_nameLabel">epazote dried bulk 1lb</span></h1>
</div>
<div id="ctl00_ctl00_NestedMaster_PageHeader_StoreHeader_H_PageCaption" class="row captionCantainer">
<div class="col-md-6">
<h1 style="font-size:28px; color:#032834;font-family:'Bitter',serif;margin:5px 0;"><span id="ctl00_ctl00_NestedMaster_PageHeader_StoreHeader_H_nameLabel">epazote dried bulk 1lb</span></h1>
</div>
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: schema.org missing markup
It looks like the product name is in the store header
StoreHeader_H_nameLabel
I don't know if changing that will work or not because in default AC code the wrapper for the product microdata is in Product.aspx and normally the header is outside that.
<div id="productPage" class="mainContentWrapper" itemtype="http://schema.org/Product" itemscope>
StoreHeader_H_nameLabel
I don't know if changing that will work or not because in default AC code the wrapper for the product microdata is in Product.aspx and normally the header is outside that.
<div id="productPage" class="mainContentWrapper" itemtype="http://schema.org/Product" itemscope>
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: schema.org missing markup
Actually, Microdata is becoming outdated. If you are going to go through the trouble to to correct or improve the Schema Markup, you might as well switch it to JSON-LD.
Does anybody know if Able is going to be doing this soon?
Does anybody know if Able is going to be doing this soon?
Contractor's Solutions
www. contractors-solutions.net
www. contractors-solutions.net
-
- Commander (CMDR)
- Posts: 139
- Joined: Wed Mar 31, 2010 8:59 pm
Re: schema.org missing markup
Hi Judy,jmestep wrote:It looks like the product name is in the store header
StoreHeader_H_nameLabel
I don't know if changing that will work or not because in default AC code the wrapper for the product microdata is in Product.aspx and normally the header is outside that.
<div id="productPage" class="mainContentWrapper" itemtype="http://schema.org/Product" itemscope>
I got waylaid.. My store header h1 code looks like this:
<div id="PageCaption" runat="server" class="row captionCantainer">
<div class="col-md-6">
<h1 style="font-size:28px; color:#032834;font-family:'Bitter',serif;margin:5px 0;"><asp:Label ID="nameLabel" runat="server"></asp:Label></h1>
</div>
<div id="topSearch" class="col-md-6">
<div class="search">
<uc:SimpleSearch runat="server" ID="SimpleSearch" />
</div>
Should I change something here? Seems like such a small thing yet, it's a big thing!
Also, I noticed in the ProductPage.axcs.cs this is commented out:
if(_Product != null)
{
//ProductName.Text = _Product.Name;
Thanks!
Barb
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: schema.org missing markup
It's hard to tell for sure without seeing all your code but if <asp:Label ID="nameLabel" runat="server"></asp:Label> shows the product name, you would add itemprop="name" to that markup and leave everything else the same.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
-
- Commander (CMDR)
- Posts: 139
- Joined: Wed Mar 31, 2010 8:59 pm
Re: schema.org missing markup
Hi Judy,
I added the itemprop="name" and when I view source I see this:
<div id="ctl00_ctl00_NestedMaster_PageHeader_StoreHeader_H_PageCaption" class="row captionCantainer">
<div class="col-md-6">
<h1 style="font-size:28px; color:#032834;font-family:'Bitter',serif;margin:5px 0;"><span id="ctl00_ctl00_NestedMaster_PageHeader_StoreHeader_H_nameLabel" itemprop="name">taste of mexico</span></h1>
But when I check it in Google they still says it's missing. Maybe because it needs a reference to --> itemtype="http://schema.org/Product" itemscope>?
I added the itemprop="name" and when I view source I see this:
<div id="ctl00_ctl00_NestedMaster_PageHeader_StoreHeader_H_PageCaption" class="row captionCantainer">
<div class="col-md-6">
<h1 style="font-size:28px; color:#032834;font-family:'Bitter',serif;margin:5px 0;"><span id="ctl00_ctl00_NestedMaster_PageHeader_StoreHeader_H_nameLabel" itemprop="name">taste of mexico</span></h1>
But when I check it in Google they still says it's missing. Maybe because it needs a reference to --> itemtype="http://schema.org/Product" itemscope>?
-
- Commander (CMDR)
- Posts: 139
- Joined: Wed Mar 31, 2010 8:59 pm
Re: schema.org missing markup
As a stop-gap fix I'm trying to get rid of the h1 product name in the store header and let the original one in the product page show. I tried to comment it out but did something incorrectly and it broke the page. For now I made it an h2, so I don't have 2 h1's but I have the product name showing twice (ugly).
How do I properly comment out just the product name (not the search stuff): Here is the code for the product name and the search that shows at the top of my page.
<div id="PageCaption" runat="server" class="row captionCantainer">
<div class="col-md-6">
<h2 style="font-size:28px; color:#ffffff;font-family:'Bitter',serif;margin:5px 0;"><asp:Label ID="nameLabel" runat="server" itemprop="name"></asp:Label></h2>
</div>
<div id="topSearch" class="col-md-6">
<div class="search">
<uc:SimpleSearch runat="server" ID="SimpleSearch" />
</div>
</div>
</div>
How do I properly comment out just the product name (not the search stuff): Here is the code for the product name and the search that shows at the top of my page.
<div id="PageCaption" runat="server" class="row captionCantainer">
<div class="col-md-6">
<h2 style="font-size:28px; color:#ffffff;font-family:'Bitter',serif;margin:5px 0;"><asp:Label ID="nameLabel" runat="server" itemprop="name"></asp:Label></h2>
</div>
<div id="topSearch" class="col-md-6">
<div class="search">
<uc:SimpleSearch runat="server" ID="SimpleSearch" />
</div>
</div>
</div>
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: schema.org missing markup
There is probably code in the code behind that populates the nameLabel so you need to comment that out also
You can hide it and leave the code behind the same by adding Visible="false" to the nameLabel tag or using html comments <!-- xxx -->
<h2 style="font-size:28px; color:#ffffff;font-family:'Bitter',serif;margin:5px 0;"><asp:Label ID="nameLabel" runat="server" itemprop="name"></asp:Label></h2>
You can hide it and leave the code behind the same by adding Visible="false" to the nameLabel tag or using html comments <!-- xxx -->
<h2 style="font-size:28px; color:#ffffff;font-family:'Bitter',serif;margin:5px 0;"><asp:Label ID="nameLabel" runat="server" itemprop="name"></asp:Label></h2>
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx