Page 1 of 1

No H1 tags showing up

Posted: Sat Jun 10, 2017 5:28 am
by foodsleuth
Bing webmaster tools pointed out my product detail pages have no H1 tags. I checked the productpage.ascx and found the page header div, commented out. I removed the comment tags and I can see H1 tags on the page but the product name is not filling in. So when I view source I see this:
<div class="pageHeader">
<h1><span id="ctl00_ctl00_NestedMaster_PageContent_ctl00_ProductName" itemprop="name"></span></h1>

</div>

There should be the product name filled in next to itemprop-"name">

Any ideas?

Thanks

Re: No H1 tags showing up

Posted: Sun Jun 11, 2017 11:40 pm
by jmestep
I don't know what version of Gold you are using, but one version has this in the ProductPage.ascx:

Code: Select all

	<h1><asp:Label ID="ProductName" runat="server" EnableViewState="false" itemprop="name"></asp:Label></h1> 

Then the name is populated in the ProductPage.ascx.cs

Code: Select all

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

Re: No H1 tags showing up

Posted: Mon Jun 12, 2017 4:34 am
by foodsleuth
Hi Judy,
Thanks for the reply. As for my version, latest one except I have not put in: 9/8/2016
Service Release 1 for AbleCommerce Gold R12

It's interesting, in my code I see this: which means it's commented out.

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

I wonder why they would have commented this out? I guess I can uncomment both the sections that were commented out, see if it fixes it. Just hoping it does not create another problem.
Thanks again for the assist!
Barb

Re: No H1 tags showing up

Posted: Mon Jun 12, 2017 4:54 am
by foodsleuth
Ok, so kind of a good news / bad news thing. I un-commented out the affected areas and now I have h1 tags BUT my product name shows twice on the page which looks lame. I think I know why the developer did it, because of the way my page was customized. I'd think there would be a way to fix, I just don't know how.

If I 'inspect' the code where the first (proper placement) heading shows it shows this:
<span id="ctl00_ctl00_NestedMaster_PageHeader_StoreHeader_H_nameLabel">cascabel chiles </span>

Then, if I inspect where the H1 shows where it doesn't belong:
<span id="ctl00_ctl00_NestedMaster_PageContent_ctl00_ProductName" itemprop="name">cascabel chiles </span>

Any suggestions on how I might alter the code to put the h1 tag in the proper place?

Clearly, I'm not a developer but... I can cut and paste! :-)
Thanks
Barb