I updated the code from the addthis.com website and it made no change. It must be something I am doing wrong because it works perfectly on your website.
Printable View
I updated the code from the addthis.com website and it made no change. It must be something I am doing wrong because it works perfectly on your website.
I think I fixed it, I had to addto the top of the pageCode:<html xmlns:fb="http://ogp.me/ns/fb#"></html>
I spoke too soon, i get the pop up window to add a comment to the link now but it is still just saying phil likes a link with no picture. Any ideas?
I've made a discovery, I installed the same code on an old site (version 1.3.8a) and it works perfectly. However on the new site (version 1.5.0) it doesn't include the title, description or image. Does anybody else have this working on zen cart version 1.5.0?
I think that it is working fine. If you just click on the facebook button it will say that you liked the product and 1 will be added to the like number. If you want to post it to your wall you click on the share button and select facebook. Then you can write a comment and it shows the product image, description, etc.
I have the template installed on 1.5 here:
http://weblyweb.com/and-test/
Thanks,
Anne
Ok so it does work with 1.5 but mine is not working the same way as the one on your site is. It does like it and the like status is added to facebook but the title, description and image are not applied to it. The best way for you to see it is to try it on my site and see for yourself what I mean. My site is down for maintenance though so I'll need to add your ip address to my exclude list so you can access it
Thanks for your help I got it sorted. Turns out the problem was simply that the site was down for maintenance so facebook couldn't scrape the page for the information. Once I figured out how the facebook like button worked it was pretty obvious.
I made a few code changes to html_header.php if anyone is interested.
To get the preview pop up window to show when the like button is pressed open the includes/templates/andover_modern/common/html_header.php
Find this near the top
and replace with thisCode:<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
I then had an issue with facebook using the wrong image, this is because it uses the first image it finds on the page, in my case it was the first image in the whats new sidebox. so to make sure it uses the correct image and to comply with facebooks recommended tags in the same file as above find this:Code:<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#" <?php echo HTML_PARAMS; ?>>
and under this add:Code:<title><?php echo META_TAG_TITLE; ?></title>
Hope this helps anyone whos looking for itCode:<meta property="og:title" content="<?php echo META_TAG_TITLE; ?>" />
<meta property="og:type" content="product" />
<meta property="og:site_name" content="<?php echo STORE_NAME; ?>" />
<meta property="og:description" content="<?php echo META_TAG_DESCRIPTION; ?>" />
<?php
if (isset($_GET['products_id'])) { // use products_image if products_id exists
$facebook_image = $db->Execute("select p.products_image from " . TABLE_PRODUCTS . " p where products_id='" . (int)$_GET['products_id'] . "'");
$fb_image = HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $facebook_image->fields['products_image'];
}
if ($fb_image == 'stickadefaultimagehere') { // if no products image, use the default image if enabled
$fb_image = '';
}
if ($fb_image != '') {
?>
<meta property="og:image" content="<?php echo $fb_image; ?>" />
<?php
}
?>
Hi,
Could anyone tell me which file(s) I need to edit so that the back button which appears on the Shipping & Returns, Privacy Notice, Conditions of Use etc. pages also appears on EZ pages that I add?
Thanks