Adding Schema.org Mark Up |
Post Reply | Page 12> |
Author | |
BDavid
Newbie Joined: 20-February-2013 Location: Las Vegas Status: Offline Points: 0 |
Post Options
Thanks(0)
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 |
|
Guests
Guest |
Post Options
Thanks(0)
|
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:
Let us know if that works out better for you. Please try an apparel product and a standard product.
|
|
Greg Dinger
Certified ProductCart Developers Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
Post Options
Thanks(0)
|
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">
|
|
BDavid
Newbie Joined: 20-February-2013 Location: Las Vegas Status: Offline Points: 0 |
Post Options
Thanks(0)
|
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
|
|
Greg Dinger
Certified ProductCart Developers Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
Post Options
Thanks(0)
|
<<<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.
|
|
Guests
Guest |
Post Options
Thanks(0)
|
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.
|
|
BDavid
Newbie Joined: 20-February-2013 Location: Las Vegas Status: Offline Points: 0 |
Post Options
Thanks(0)
|
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
|
|
whizzinpc
Newbie Joined: 17-January-2006 Location: California Status: Offline Points: 20 |
Post Options
Thanks(0)
|
This should be something built into PC.
|
|
Lindsay
Newbie Joined: 17-December-2008 Status: Offline Points: 17 |
Post Options
Thanks(0)
|
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 |
|
whizzinpc
Newbie Joined: 17-January-2006 Location: California Status: Offline Points: 20 |
Post Options
Thanks(0)
|
We also want to add the ability to see ratings and stock. It should definitely boost click throughs.
|
|
Post Reply | Page 12> |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |