Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STRF-6450 - Updates to Product Page Template for Google Structured Data #1577

Merged
merged 1 commit into from Oct 1, 2019

Conversation

@bc-jz
Copy link
Contributor

commented Sep 24, 2019

What?

It was found that we are not properly marking up some fields that are available on a product page for Google Structured Data. This PR fixes some of our markup and adds some additional markup.

The current errors seen on most product pages (which have reviews added to the product) is:
2019-09-24_1002

Also found a bug where if a price range is being displayed then the "offer availability" property does not display correctly:
2019-09-24_1009

Tickets / Documentation

JIRA ticket:
https://jira.bigcommerce.com/browse/STRF-6450

Google Structured Data (Product) information:
https://developers.google.com/search/docs/data-types/product

Screenshots (if appropriate)

Screenshot having applied my updated cornerstone bundle to my production store that I used to generate the error images above. The product is displaying a price range:
2019-09-24_1034

Note only 1 warnings is now seen. This remaining warning for priceValidUntil is not something we can currently address.

…hema for the product page template.
@bigbot

This comment has been minimized.

Copy link

commented Sep 24, 2019

@@ -29,8 +29,11 @@
<abbr title="{{lang 'products.including_tax'}}">{{lang 'products.price_with_tax' tax_label=price.price_range.min.tax_label}}</abbr>
{{/and}}
{{#if schema_org}}
<meta itemprop="availability" content="{{product.availability}}">
<meta itemprop="availability" itemtype="http://schema.org/ItemAvailability"

This comment has been minimized.

Copy link
@bookernath

bookernath Sep 26, 2019

Contributor

Should this be solved in cornerstone or server side?

Copy link
Contributor

left a comment

Overall this looks good, but I want to understand if availability should be handled in template logic (which requires theme updates) or if we can just fix what it returns server side.

@bc-jz

This comment has been minimized.

Copy link
Contributor Author

commented Sep 30, 2019

I think we will need changes to template logic either way. What I added to the price-ranges template was following an established pattern in prices which is was missing for parity. If we alter our backend behavior to return an already calculated availabilityStatus (or something like that) value then templates will still need changes to use this new value while removing their existing logic (at least in prices template).

@bc-jz bc-jz merged commit c1af1b8 into bigcommerce:master Oct 1, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.