ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Meta Tags Help
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Meta Tags Help

 Post Reply Post Reply
Author
Message
rotokirby View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22-April-2007
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote rotokirby Quote  Post ReplyReply Direct Link To This Post Topic: Meta Tags Help
    Posted: 09-March-2011 at 8:02pm
I'm working on making it a little easier for us to cross post links to our newest products on Facebook.

One of the Facebook features for posting is the "Link" button. When you click it, it pulls the title, description and image from the linked page for the post.

But without the correct meta-tag to tell Facebook which image to use, it can't find the correct product image for the link, but rather tries to pull random images from our navigation.

A little searching has led me to believe we need the following in the head of each page....

< link rel="image_src" href="http://www.example.com/" />

What I'd like is code to generate that meta-tag, linking it to the general image for the product page, or if the link is to a search result or category page... the thumbnail image for the first item returned by the search adn/or in the category. I suppose we would need a fall back in case the linked page is something other than a product page, search result or category page.

Anyone done anything like that?
Rotofugi Designer Toy Store & Gallery
Chicago > IL > US
http://rotofugi.com
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 (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 09-March-2011 at 10:44pm

By the time header.asp gets invoked by viewPrd.asp, we know what product id we are working with, and have already grabbed the database fields.

These statements define the variables that contains the image names.
pimageUrl=rs("imageUrl")
pLgimageURL=rs("largeImageURL")
 
You should be able to simply add some code that writes your meta tag into the header.asp file.
 
<% if pcStrPageName = "viewPrd.asp" then %>
<link rel="image_src" href="http://www.example.com/store/pc/catalog/<%=pimageUrl%>" />
<% end if %>
 
Note that I have not tested this. 


Edited by Greg Dinger - 09-March-2011 at 10:45pm
Back to Top
rotokirby View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22-April-2007
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote rotokirby Quote  Post ReplyReply Direct Link To This Post Posted: 10-March-2011 at 12:45am
Greg...you rule.

That works perfectly for individual product pages.

Now...any ideas on how to build that same link for a search result, using the image of the first result?

When we add a bunch of products at once I like to point customers to just the group (such as all in stock products for a certain keyword) I want them to see using a search result link.

I tried to use pcShowProductsH.asp to make a link for each image on the page, but I think Facebook needs it to be in the head of the document.


Rotofugi Designer Toy Store & Gallery
Chicago > IL > US
http://rotofugi.com
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 (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 10-March-2011 at 10:03am
Might want to look at the code and see if there is similar logic that grabs the database.  If that doesn't work out, maybe have us do this for you as we wrap up that upgrade project?
Back to Top
rotokirby View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22-April-2007
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote rotokirby Quote  Post ReplyReply Direct Link To This Post Posted: 10-March-2011 at 2:34pm
Thanks Greg....I couldn't figure out an easy way to do it on the search results page since they database calls all actually take place in ShowProductsH.asp instead of searchresults.asp.

Regardless...yeah, we'll look into it further when we're ready to wrap up the transition you're already helping us with. Thanks!
Rotofugi Designer Toy Store & Gallery
Chicago > IL > US
http://rotofugi.com
Back to Top
ProductCart View Drop Down
Admin Group
Admin Group

ProductCart Team

Joined: 01-October-2003
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote ProductCart Quote  Post ReplyReply Direct Link To This Post Posted: 11-March-2011 at 3:24am
We will add rel="image_src" to ProductCart in the next version, at least to category and product pages.
The ProductCart Team

Home of ProductCart shopping cart software
Back to Top
rotokirby View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22-April-2007
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote rotokirby Quote  Post ReplyReply Direct Link To This Post Posted: 11-March-2011 at 2:19pm
Thanks EI team. Top notch as always!
Rotofugi Designer Toy Store & Gallery
Chicago > IL > US
http://rotofugi.com
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.074 seconds.