schema.org missing markup

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
foodsleuth
Commander (CMDR)
Commander (CMDR)
Posts: 139
Joined: Wed Mar 31, 2010 8:59 pm

schema.org missing markup

Post by foodsleuth » Mon Mar 19, 2018 10:58 am

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

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: schema.org missing markup

Post by jmestep » Mon Mar 19, 2018 9:43 pm

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

foodsleuth
Commander (CMDR)
Commander (CMDR)
Posts: 139
Joined: Wed Mar 31, 2010 8:59 pm

Re: schema.org missing markup

Post by foodsleuth » Tue Mar 20, 2018 9:29 am

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?

foodsleuth
Commander (CMDR)
Commander (CMDR)
Posts: 139
Joined: Wed Mar 31, 2010 8:59 pm

Re: schema.org missing markup

Post by foodsleuth » Tue Mar 20, 2018 10:20 am

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>

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: schema.org missing markup

Post by jmestep » Tue Mar 20, 2018 10:07 pm

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>
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

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: schema.org missing markup

Post by kwikstand » Thu Apr 19, 2018 6:33 am

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?
Contractor's Solutions
www. contractors-solutions.net

foodsleuth
Commander (CMDR)
Commander (CMDR)
Posts: 139
Joined: Wed Mar 31, 2010 8:59 pm

Re: schema.org missing markup

Post by foodsleuth » Tue Mar 12, 2019 6:32 am

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>
Hi Judy,
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! :shock: :shock:

Also, I noticed in the ProductPage.axcs.cs this is commented out:
if(_Product != null)
{
//ProductName.Text = _Product.Name;

Thanks!
Barb

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: schema.org missing markup

Post by jmestep » Tue Mar 12, 2019 8:59 pm

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

foodsleuth
Commander (CMDR)
Commander (CMDR)
Posts: 139
Joined: Wed Mar 31, 2010 8:59 pm

Re: schema.org missing markup

Post by foodsleuth » Thu Mar 14, 2019 3:08 am

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>?

foodsleuth
Commander (CMDR)
Commander (CMDR)
Posts: 139
Joined: Wed Mar 31, 2010 8:59 pm

Re: schema.org missing markup

Post by foodsleuth » Thu Mar 14, 2019 3:51 am

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>

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: schema.org missing markup

Post by jmestep » Sun Mar 17, 2019 9:15 pm

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>
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

Post Reply