Post by JoaniesGifts » Wed Nov 09, 2011 8:15 am

Hi Guys,
My site,http://www.joaniesgifts.co.uk is running 1.4.9.4.

After spending some time playing with G+ today i realised that my social buttons arent working on my product pages (at least some of the time)...

When i tested the product http://www.joaniesgifts.co.uk/terramund ... rrari-fund by +1ing it i noticed that a wrong image was posted to my google profile. When I clicked the facebook like button, I noticed that the image that was posted to the profile was some kind of default image with a random code on it (like those images to prove you're human).

It seems to work on some products and not others?

Can anyone help?

Kind Regards,
Joan

Thoughtful Gifts by Joanie's Gifts - The Thought Counts...


User avatar
Active Member

Posts

Joined
Fri Oct 29, 2010 8:59 pm
Location - UK

Post by JoaniesGifts » Thu Nov 10, 2011 3:59 am

Update :-

Google+1 now shows correct image but gives an error (red box with !) on certain products such as :-

http://www.joaniesgifts.co.uk/east-of-i ... -stars-mug

Facebook like seems to sometimes post wrong picture including the "check if human" image from the reviews section...

Anyone have any clue?

Has anyone got this fully working?

Many thanks,
Joan

Thoughtful Gifts by Joanie's Gifts - The Thought Counts...


User avatar
Active Member

Posts

Joined
Fri Oct 29, 2010 8:59 pm
Location - UK

Post by uksitebuilder » Thu Nov 10, 2011 4:25 pm

Not sure what addon you are using, but for Facebook like buttons, you also need to have a facebook meta tag add to the head section of the page which specifies the image to use - plus some other meta

see -> http://developers.facebook.com/docs/opengraph/

Google +1 is known to clash with other scripts such as fancybox etc - alas I dont have a solution at present for this

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by JoaniesGifts » Thu Nov 10, 2011 5:48 pm

Thanks again Simon for jumping in.

The code i used wasn't an official addon, just tips I'd picked up on the forum so I guess
I need to be a bit more clever with the meta. The problem I guess is the meta would need to go in the header file and that wouldn't have information about a product?

Regarding+1, I guess I'll have to remove it until someone gets it working which is a shame as there is a split in opinions that it could help seo!

Kind Regards
Joan

Thoughtful Gifts by Joanie's Gifts - The Thought Counts...


User avatar
Active Member

Posts

Joined
Fri Oct 29, 2010 8:59 pm
Location - UK

Post by JoaniesGifts » Sat Nov 12, 2011 5:48 pm

In case anyone also having the facebook like wrong image issue - there is a known bug in facebook

issue - http://developers.facebook.com/bugs/285421101492706

It affects this line of your code. I've had to remove it for the time being. Not sure if this has some other affect..

// adding facebook's meta tags for Like button
$this->document->addFBMeta('og:title', $this->data['heading_title']);
$this->document->addFBMeta('og:url',$this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id=' . $this->request->get['product_id']));
$this->document->addFBMeta('fb:admins', 'joanie');
$this->document->addFBMeta('og:type', 'product');
$this->document->addFBMeta('og:site_name', $this->config->get('config_name'));
$this->document->addFBMeta('og:image', $this->data['thumb'] );

Thoughtful Gifts by Joanie's Gifts - The Thought Counts...


User avatar
Active Member

Posts

Joined
Fri Oct 29, 2010 8:59 pm
Location - UK

Post by spirit » Sat Nov 19, 2011 10:03 am

I have the same trouble with addthis.com (default share buttons in OC 1.5.X).
Sometimes, Facebook don't show the correct product image... how can i fix it?

Thanks!

Active Member

Posts

Joined
Sat Oct 02, 2010 7:40 am

Post by jimaras » Fri Nov 25, 2011 11:23 pm

spirit wrote:I have the same trouble with addthis.com (default share buttons in OC 1.5.X).
Sometimes, Facebook don't show the correct product image... how can i fix it?

Thanks!

I have the same problem.
Isn't any solution?

http://e-kreopoleio.com/


Active Member

Posts

Joined
Thu Sep 15, 2011 1:45 am

Post by uksitebuilder » Sat Nov 26, 2011 2:41 am

try the following

edit: catalog/model/catalog/product.php

find

Code: Select all

	public function getProductImages($product_id) {
		$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "'");

		return $query->rows;
	}
add before

Code: Select all

	public function getProductMainImage($product_id) {
		$query = $this->db->query("SELECT image FROM " . DB_PREFIX . "product WHERE product_id = '" . (int)$product_id . "'");

		return $query->row['image'];
	}	
edit: catalog/controller/common/header.php

find

Code: Select all

		$this->data['keywords'] = $this->document->getKeywords();
add after

Code: Select all

if(isset($this->request->get['product_id'])){
		$this->load->model('setting/extension');
		$this->data['fbimage'] = $this->model_catalog_product->getProductMainImage($this->request->get['product_id']);
}

edit: catalog/view/theme/default/template/common/header.tpl

find

Code: Select all

<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
add after

Code: Select all

<?php if(isset($fbimage)){ ?><meta property="og:type" content="image"/>
<meta property="og:image" content="<?php echo HTTP_IMAGE.$fbimage; ?>"/>
<?php } ?>

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by jimaras » Sat Nov 26, 2011 7:28 am

uksitebuilder wrote:try the following

edit: catalog/model/catalog/product.php

find

Code: Select all

	public function getProductImages($product_id) {
		$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "'");

		return $query->rows;
	}
add before

Code: Select all

	public function getProductMainImage($product_id) {
		$query = $this->db->query("SELECT image FROM " . DB_PREFIX . "product WHERE product_id = '" . (int)$product_id . "'");

		return $query->row['image'];
	}	
edit: catalog/controller/common/header.php

find

Code: Select all

		$this->data['keywords'] = $this->document->getKeywords();
add after

Code: Select all

if(isset($this->request->get['product_id'])){
		$this->load->model('setting/extension');
		$this->data['fbimage'] = $this->model_catalog_product->getProductMainImage($this->request->get['product_id']);
}

edit: catalog/view/theme/default/template/common/header.tpl

find

Code: Select all

<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
add after

Code: Select all

<?php if(isset($fbimage)){ ?><meta property="og:type" content="image"/>
<meta property="og:image" content="<?php echo HTTP_IMAGE.$fbimage; ?>"/>
<?php } ?>
uksitebuilder thanks a lot!
That was very helpful!
I have no words to thank you! :ok:

http://e-kreopoleio.com/


Active Member

Posts

Joined
Thu Sep 15, 2011 1:45 am

Post by uksitebuilder » Sat Nov 26, 2011 6:07 pm

Here's a vqmod for those that want it
requires vqmod >= 2.1.5

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by spirit » Sun Nov 27, 2011 12:55 pm

uksitebuilder wrote:Here's a vqmod for those that want it
uksb_facebook_like_image_fix.xml
requires vqmod >= 2.1.5
Thanks Simons, worked fine! :)

Active Member

Posts

Joined
Sat Oct 02, 2010 7:40 am

Post by spirit » Wed Nov 30, 2011 2:06 am

I don't know why, but sometimes facebook share does not work (doesn't display any picture).
why? :/

Active Member

Posts

Joined
Sat Oct 02, 2010 7:40 am

Post by uksitebuilder » Wed Nov 30, 2011 3:34 am

view the page source to see the meta tag is there for the image for facebook

if it is, check the image exists and is greater than 50px X 50px

Also check the ratio of width to height is not greater than 3:1

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by jimaras » Thu Dec 15, 2011 3:31 pm

uksitebuilder wrote:Here's a vqmod for those that want it
uksb_facebook_like_image_fix.xml
requires vqmod >= 2.1.5
Can you fix like images for category images?

http://e-kreopoleio.com/


Active Member

Posts

Joined
Thu Sep 15, 2011 1:45 am

Post by uksitebuilder » Thu Dec 22, 2011 3:36 am

Do you mean the actual category image or the product images shown in the list of products when viewing a category. ?

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by jimaras » Thu Dec 22, 2011 10:18 pm

uksitebuilder wrote:Do you mean the actual category image or the product images shown in the list of products when viewing a category. ?
Hi,
I mean the actual category image

http://e-kreopoleio.com/


Active Member

Posts

Joined
Thu Sep 15, 2011 1:45 am

Post by TraderDan » Mon Feb 06, 2012 9:09 pm

First tried making all the edits manually, which was easy enough, but product images were still not showing on Facebook (running 1.5.1.3). Checked by viewing source and I can confirm that the meta tags were NOT there.

Then I reversed the edits and installed the vqmod... works GREAT! Both Facebook and Google+ are showing the correct product images. Thanks a lot uksb, this issue was really annoying me!!

;D

My only suggestion is that JoaniesGifts add the old "[SOLVED]" to the thread title so users are better informed.

Image


User avatar
New member

Posts

Joined
Thu Oct 27, 2011 10:44 pm
Location - Lawrence, MA

Post by spirit » Wed Feb 08, 2012 9:48 am

TraderDan wrote:First tried making all the edits manually, which was easy enough, but product images were still not showing on Facebook (running 1.5.1.3). Checked by viewing source and I can confirm that the meta tags were NOT there.

Then I reversed the edits and installed the vqmod... works GREAT! Both Facebook and Google+ are showing the correct product images. Thanks a lot uksb, this issue was really annoying me!!

;D

My only suggestion is that JoaniesGifts add the old "[SOLVED]" to the thread title so users are better informed.
Damn, for this reason the images don't work all the time in my site.
But, what's the problem with the manually edits? Because i don't use vQmod.
I hope your help, thanks!

Active Member

Posts

Joined
Sat Oct 02, 2010 7:40 am

Post by jimaras » Fri Feb 10, 2012 1:13 am

uksitebuilder wrote:view the page source to see the meta tag is there for the image for facebook

if it is, check the image exists and is greater than 50px X 50px

Also check the ratio of width to height is not greater than 3:1
I can't understand why in this product http://e-kreopoleio.com/%CE%AD%CF%84%CE ... F%84%CF%8C loads properly the image but in this product http://e-kreopoleio.com/%CE%AD%CF%84%CE ... %84%CF%8C- didn't load it properly.The page source is the same.

http://e-kreopoleio.com/


Active Member

Posts

Joined
Thu Sep 15, 2011 1:45 am

Post by uksitebuilder » Tue Feb 14, 2012 4:26 am

because 2nd link is a category page.

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom
Who is online

Users browsing this forum: No registered users and 28 guests