Denver Prophit Jr. Posted April 12, 2015 Share Posted April 12, 2015 I was running a site through FB's linter debug and found all sorts of invalid OGP tags in the header. I narrowed it down to /modules/socialsharing/views/templates/hook/socialsharing_header.tpl <meta property="og:title" content="{$meta_title|escape:'html':'UTF-8'}" /> <meta property="og:url" content="{$request}" /> <meta property="og:type" content="product" /> <meta property="og:site_name" content="{$shop_name}" /> <meta property="og:description" content="{$meta_description|escape:'html':'UTF-8'}" /> <meta property="og:email" content="" /> <meta property="og:phone_number" content="" /> <meta property="og:street-address" content="" /> <meta property="og:locality" content="" /> <meta property="og:country-name" content="" /> <meta property="og:postal-code" content="" /> {if isset($link_rewrite) && isset($cover) && isset($cover.id_image)} <meta property="og:image" content="{$link->getImageLink($link_rewrite, $cover.id_image, large_default)}" /> {/if} Now, according to FB's developer docs: https://developers.facebook.com/docs/reference/opengraph#object-type explains the valid types of FB's official og types. Even though products are custom and not documented at http://ogp.me/#types Facebook goes further into detail about product pages with this link https://developers.facebook.com/docs/reference/opengraph/object-type/product/ There are many useful tags to setup a solid RDFa relationship. I noticed there was a tag for product.group which may be useful on category pages. The default-boostrap theme may even should use a schema collection page definition. Please support and vote for my feature request to enhance this module header to be more intelligent on the page types. Be they CMS or product or product category! http://forge.prestashop.com/browse/PSCSX-5317 Link to comment Share on other sites More sharing options...
Denver Prophit Jr. Posted April 12, 2015 Author Share Posted April 12, 2015 Maybe use code from http://doc.prestashop.com/display/PS16/Using+the+Context+Object and check the context controller and if cms controller, include smarty template for ogp article and if context controller is product controller, smarty include special template for product ogp. Still studying... Link to comment Share on other sites More sharing options...
Denver Prophit Jr. Posted April 21, 2015 Author Share Posted April 21, 2015 Fantastic. Bug accepted and modified Fantastic! The new link is http://forge.prestashop.com/browse/NM-367 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now