Print Page | Close Window

Adding Schema.org Mark Up

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Search Engine Optimization
Forum Description: Talk about ways to optimize your ProductCart store for search engines
URL: https://forum.productcart.com/forum_posts.asp?TID=5505
Printed Date: 21-November-2024 at 8:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Adding Schema.org Mark Up
Posted By: BDavid
Subject: Adding Schema.org Mark Up
Date Posted: 21-February-2013 at 12:54pm
1st time posting...

I am looking for some help in adding the schema.org markup to our site.  I have been able to add some limited markup during the product creation (desc, brand, model, etc) in the long description field.  However I have been trying in viewprdcode.asp to add the makeup so every product would receive the same markup "automatically". 

Here is an example of what I have added for the SKU to viewprdcode.asp

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' START:  Show SKU
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Sub pcs_ShowSKU
IF pHideSKU<>"1" THEN%>
<div class="pcShowProductSku" itemscope itemtype="http://schema.org/product">
<span itemprop="sku">
<%=dictLanguage.Item(Session("language")&"_viewCat_P_8")%>: 
<%'APP-S
if pcv_Apparel="1" then%>
<input name="sku" type="text" value="<%response.write pSku%>" readonly size="40" class="transparentField">
<%else%>
<%=pSku%>
<%end if
'APP-E%>

</span>
</div>
<%ELSE%>
<input name="sku" type="hidden" value="<%response.write pSku%>">
<%END IF
End Sub
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' END:  Show SKU
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Googles structured date testing tool shows that it sees the mark up.  The problem I seem to run into is the markup does not see any of the returned values (the actual SKU).

Hoping that somebody has some insight on this as I am brand new to it.

Thank you in advance for your time and assistance,

Brian





Replies:
Posted By: Guests
Date Posted: 21-February-2013 at 2:23pm
Hi Brian,

Excellent topic.

I'm not sure how well the SKU value is going to be picked up on apparel items with the use of the input field there (it would be better if PC used a span with .innerHTML changing this up rather than .value, my thinks), but either way I expect this would give a better result:
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' START:  Show SKU
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Sub pcs_ShowSKU
IF pHideSKU<>"1" THEN%>
<div class="pcShowProductSku" itemscope itemtype="http://schema.org/product">
<%=dictLanguage.Item(Session("language")&"_viewCat_P_8")%>: 
<%'APP-S
if pcv_Apparel="1" then%>
<input itemprop="sku" name="sku" type="text" value="<%response.write pSku%>" readonly size="40" class="transparentField" />
<%else%>
<span itemprop="sku"><%=pSku%></span>
<%end if
'APP-E%>
</div>
<%ELSE%>
<input name="sku" type="hidden" value="<%response.write pSku%>">
<%END IF
End Sub
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' END:  Show SKU
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Let us know if that works out better for you. Please try an apparel product and a standard product.


Posted By: Greg Dinger
Date Posted: 21-February-2013 at 2:27pm
I'm curious what might happen if you did this:
<input itemprop="sku" name="sku" type="text" value="<%response.write pSku%>" readonly size="40" class="transparentField">


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: BDavid
Date Posted: 21-February-2013 at 4:06pm
Thank you for the ideas. 

 I have tried the changes and there was no change in the results.  I have a felling it is due to the apparel add-on function (I may be dead wrong).  I was able to have the SKU and its value show up in the structured data test on a product not using apparel add-on.  

I may be way off base but the original products SKU appears as follows when you view source:
<div class="pcShowProductSku" itemscope itemtype="http://schema.org/product">
<span itemprop="sku">
		SKU: 
		<input itemprop="sku" name="sku" type="text" value="36NB" readonly size="40" class="transparentField">
		</span>
While the non-apparel add-on reads this way:
<div class="pcShowProductSku" itemscope itemtype="http://schema.org/product">
		SKU: 
		<span itemprop="sku">9618BL/CH/SA</span>
</div>
I can only assume the second has what I am calling a static SKU where I am guessing the additional information in the first allows for the dynamic apparel add-on SKU.
This is what you were referring to Sean, correct?
I do appreciate the ideas and if anybody has any others they would be greatly appreciated.
Thank you again for your time,

Brian



Posted By: Greg Dinger
Date Posted: 21-February-2013 at 4:33pm
<<<dynamic apparel add-on SKU>>>
Just so that you can use terminology that is commonly understand, that would be the subproduct SKU.  And yes, I'm suspecting that if this is an apparel product you are looking at for your analysis, that the fact that this is reading an input tag that such may be the problem.
 
What you might want to do is to also write the SKU (either for standard products or the subproduct SKU) in plain text at a slightly different location on the page, and use CSS to non-display that value.  Then wrap that with your code for the schema stuff.   See if that plays nice.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: Guests
Date Posted: 21-February-2013 at 5:40pm
Yes, Brian, that is what I was referring to.

First, have another look at the markup I sent you. I removed the <span itemprop="sku"> for the apparel condition. That might help.

I suspect, though, that having the value of the parent product SKU (default when the page loads) stored as the value of an input might be a problem.

PC does this to switch up the SKU on the fly when the options selected combine to select a certain sub-product which represents that particular combination of options.

If it is the case that the input value is the problem, the ideal solution would be to revise this to not use an input for this purpose, but the more contemporary <span id="SKU"> and switch up the value using .innerHTML rather than .value. A bit too complicated to show that here.

Scheme.org specifies not to tag any hidden elements, so if it's important to tag the parent product SKU for apparel items, the above would be the proper way to do it.


Posted By: BDavid
Date Posted: 22-February-2013 at 5:28pm
Thanks again for all the help.

Sorry for the confusion Sean i copied that while trying a few different combinations.  
Here is actually what I came up with after some trial and error.  So far it has not caused any problems and it accounts for both products that are apparel add-on and ones that are not.

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' START:  Show SKU
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Sub pcs_ShowSKU
IF pHideSKU<>"1" THEN%>
<div class="pcShowProductSku">
<%=dictLanguage.Item(Session("language")&"_viewCat_P_8")%>: 
<%'APP-S
if pcv_Apparel="1" then%>
<span itemprop="sku" content="<%response.write pSku%>" /><input name="sku" type="text" value="<%response.write pSku%>" readonly size="40" class="transparentField">
<%else%>
<span itemprop="sku" content="<%=pSku%>" /><%=pSku%>
<%end if
'APP-E%>

</div>
<%ELSE%>
<input name="sku" type="hidden" value="<%response.write pSku%>">
<%END IF
End Sub
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' END:  Show SKU
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Any feed back is appreciated.

Thanks again guys,

Brian


Posted By: whizzinpc
Date Posted: 22-March-2013 at 1:29am
This should be something built into PC. 


Posted By: Lindsay
Date Posted: 23-March-2013 at 7:25pm
Originally posted by whizzinpc whizzinpc wrote:

This should be something built into PC. 


Agreed. I hope EI adds the option to add rich snippets sooner rather than later.

Anyone have any input on editing pc files to mark up the product reviews? Having a product's google listing visually  show that our customers have given it 5 of 5 stars would, I think, boost click throughs significantly.
http://support.google.com/webmasters/bin/answer.py?hl=en&answer=146645


Posted By: whizzinpc
Date Posted: 25-March-2013 at 10:09pm
We also want to add the ability to see ratings and stock. It should definitely boost click throughs.


Posted By: Guests
Date Posted: 22-September-2013 at 1:58am
Not sure how many folks beyond Lindsay & Art are following this, but I've been doing a tremendous amount of research on this and have a tool kit all worked up for it -- though not with pretty installation instructions yet.

I think it's running down the wrong path to look at any of this as "Schema.org Mark Up" (e.g. "itemscope/itemtype/itemprop" -- the Microdata markup)

This is all rather recently emerging, and I've spent a good deal of time bogged down in the tech debate regarding Structured Data/Semantic Web esp. regarding Microdata vs RDFa Lite. RDFa and RDFa Lite are now a true standard and the consensus of the W3C over Mircrodata (Schema.org is really more the current vocabulary -- over Data-Vocabulary.org -- and not really the syntax for marking up content, despite that it's still referencing Microdata markup). 

Here's a bombshell post on that from the point person on the W3C, Manu Sporny:
http://manu.sporny.org/2012/mythical-differences/" rel="nofollow - http://manu.sporny.org/2012/mythical-differences/
"Here’s the short answer for those of you that don’t have the time to read this entire blog post: Use RDFa Lite – it does everything important that Microdata does, it’s an official standard, and has the strongest deployment of the two."

Then a month ago:
http://manu.sporny.org/2013/microdata-downward-spiral/" rel="nofollow - http://manu.sporny.org/2013/microdata-downward-spiral/
"Microdata doesn’t have an active community supporting it. It never really did.... If you want to build a solution on a solid technology, with a solid community and solid implementations; RDFa is that solution."

Seems things are changing so quickly that the major contributors are out of date: Schema.org examples, Google Webmaster references, Bing tools & references, etc. 

Meanwhile Everyone else been chasing marking up their content for Microdata syntax because that's what the dated examples, references and sheep herd mentality are doing. I can't help but quote Sporny here:
"What I am saying is that if your customers want good search rankings, that you will use whatever technology will give you the best result. So, if Google makes it seem as if Microdata+schema.org is preferred, you will listen to their advice and implement it (because not doing so is going to be against your customer’s best interests)."

Perception is 9/10th of reality for most folks ... and with Microsoft/Yahoo!'s Bing validator, validating Microdata vs RDFa Lite clearly being biased towards Microdata in the tool -- despite that they've signed on as RDFa as the current standard for search.

So, that just makes this all so confusing for a merchant, let alone their SEO/SEM consultants as just a bunch of "egg head mumbo jumbo". Sporny is right, the herd will rush towards what they see in the examples, docs & tools (as they don't appreciate the tech). 

For this reason I've worked it up as both fully validated Mircrodata, validated on everything, AND as RDFa Lite, validated on everything but Bing's obviously lacking validator. When I release, I'll provide folks the choice of which way they want to go with a recommendation of the RDFa Lite version.

I hope this isn't all too techie mumbo jumbo, as I think is is now a seriously important discussion to have: First, implementing Structured Data, and what data to include; Second, which way to go (Microdata or RDFa Lite).



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net