Page 1 of 1

Schema.org "name" field missing

Posted: Thu Feb 28, 2019 4:49 am
by foodsleuth
Hi,
Hopefully someone out there can help out. I think I wrote about this a long time ago. Due to a modification to our site the schema.org <meta itemprop="name" content="blah blah"> tag does not show up for any of our products. Although I know it should get fixed in the code I haven't been able to get the work done. So, is there anyway for me to manually enter the information for each product "somewhere" in the able product page. It's a ton of work but at least I could the information on my most important products.
Thanks!
Barb

A little update. So I looked at my old post and it was pointed out that my product name got moved to the storeheader page. I used the structured data helper and it said to change this:
<h1 style="font-size:28px; color:#032834;font-family:'Bitter',serif;margin:5px 0;"><asp:Label ID="nameLabel" runat="server"></asp:Label></h1>

to this:
<h1 style="font-size:28px; color:#032834;font-family:'Bitter',serif;margin:5px 0;"><span itemprop="name" id="ctl00_ctl00_NestedMaster_PageHeader_StoreHeader_H_nameLabel">mooncake mold round</span></h1>

So clearly I have to remove the product name, anyone suggest exactly what that line of code should say? I hope not to break the page.

Thanks!
Barb

Re: Schema.org "name" field missing

Posted: Sun Mar 03, 2019 10:17 pm
by jmestep
You would remove this tag, assuming you are going to put the original code elsewhere so that you have the name:

Code: Select all

<span itemprop="name" id="ctl00_ctl00_NestedMaster_PageHeader_StoreHeader_H_nameLabel">mooncake mold round</span>
AC original code comes in ConLib/ProductPage.ascx, right after the breadcrumb tag:

Code: Select all

<div class="pageHeader">
	<h1><asp:Label ID="ProductName" runat="server" EnableViewState="false" itemprop="name"></asp:Label></h1> 
</div>
ConLib/ProductPage.ascx.cs has

Code: Select all

  if(_Product != null)
            {
                ProductName.Text = _Product.Name;