delia:
I do have a modified version for placing a like button anywhere else in the cart. PM me if you are interested.
Hi Delia, can you post the modified version?
I have the like button working on products, it gets the proper info and images. I have modified the code a bit to display on my homepage, works fine but gets first image on the page, IE the "For All pets" tab.
site is: http:// habitathaven .com
Here is my homepage code, changed php echo to home URL and works fine, just need to select a static image via metatags or hard coded.
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: '158346437554948', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
<fb:like href="http://habitathaven.com/"></fb:like>
My includes/modules/custom_template/meta_tags.php
//added p.products_image for facebook opengraph / like button
$sql= "select pd.products_name, p.products_model, p.products_price_sorter, p.products_tax_class_id, p.products_image,
p.metatags_title_status, p.metatags_products_name_status, p.metatags_model_status,
p.products_id, p.metatags_price_status, p.metatags_title_tagline_status,
pd.products_description, p.product_is_free, p.product_is_call,
mtpd.metatags_title, mtpd.metatags_keywords, mtpd.metatags_description
from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd) left join " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . " mtpd on mtpd.products_id = p.products_id and mtpd.language_id = '" . (int)$_SESSION['languages_id'] . "'
where p.products_id = '" . (int)$_GET['products_id'] . "'
and p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
$product_info_metatags = $db->Execute($sql);
if ($product_info_metatags->EOF) {
$meta_tags_over_ride = true;
} else {
As a Wordpress guy I want to use "if_is_home" or similar, or maybe define home meta tags like;
// Home Page Only:
define('HOME_PAGE_META_DESCRIPTION'
Any ideas?
Thanks