ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Getting Started
  New Posts New Posts RSS Feed - OG:Image Property on Category Pages
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

OG:Image Property on Category Pages

 Post Reply Post Reply
Author
Message
asteriskmmt View Drop Down
Newbie
Newbie


Joined: 22-July-2013
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote asteriskmmt Quote  Post ReplyReply Direct Link To This Post Topic: OG:Image Property on Category Pages
    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?
ogImage=rsTagObj("smallimageurl")
<meta property="og:image" content="http://www.bestfriendservices.com/store/pc/catalog/<%=ogImage%>"/>

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.





Back to Top
asteriskmmt View Drop Down
Newbie
Newbie


Joined: 22-July-2013
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote asteriskmmt Quote  Post ReplyReply Direct Link To This Post Posted: 22-July-2013 at 7:21pm
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!
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (1) Thanks(1)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 22-July-2013 at 7:39pm
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.
 
 
Back to Top
asteriskmmt View Drop Down
Newbie
Newbie


Joined: 22-July-2013
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote asteriskmmt Quote  Post ReplyReply Direct Link To This Post Posted: 22-July-2013 at 9:48pm
Thanks Greg!
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.