OG:Image Property on Category Pages |
Post Reply |
Author | |
asteriskmmt
Newbie Joined: 22-July-2013 Status: Offline Points: 4 |
Post Options
Thanks(0)
Posted: 22-July-2013 at 7:20pm |
I am using ProductCart v4.1bacm SP 1 and have just discovered a bug with the way that the include-metatags.php file creates the Open Graph meta tags.
It works just fine on product pages (BTO or otherwise), but it doesn't work on the homepage or category pages because it uses a reference of <%=ogImage%> which is only defined for Product page section of the include-metatags.php file, thus creating a reference to a broken image, so that when people go to share this content on Facebook, it shows up with a broken link (or none at all). How do we define the following variable in such a way as to have it also see the small images for category pages, and then if no image, default to some image?
This has become a prominent issue for me as I just implemented a new feature which uses these values to "recommend" other pages to the visitor, and half of my "recommendations" are to pages with a broken image. See http://www.bestfriendservices.com/ and then browse a few pages to see what I am talking about. |
|
asteriskmmt
Newbie Joined: 22-July-2013 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
PS: I just inherited this site and am by no means a PC expert, please let me know if this was custom code added by a previous Dev or if this is the same code used on all PC sites.
Thanks in advance!
|
|
Greg Dinger
Certified ProductCart Developers Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
Post Options
Thanks(1)
|
That's not stock code. If you look at line 324 of the file you reference you'll see this: 'nuc
Kevin did that for CJ years ago. |
|
asteriskmmt
Newbie Joined: 22-July-2013 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Thanks Greg!
|
|
Post Reply | |
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 |