I’ve added this code to “default_template.tpl” file from skins area.
The like button is posted, I can click and add a comment that appears on facebook with the proper url but with the wrong picture!
I get the captcha picture instead of the product thumbnail.
2 - Here is the product URL in CS-Cart 2.1.2, of course, change “YOURWEBSITE.COM” with your real website URL!:
http://YOURWEBSITE.COM{"products.view?product_id=`$product.product_id`"|fn_url}
```<br />
<br />
3 - No need to jeopardize your meta tags or anything else in your header "index.tpl" it works fine without, in standalone!<br />
<br />
4 - Here is my own code, of course, change "YOURWEBSITE.COM" with your real website URL!:<br />
<br />
```php
<iframe src="http://www.facebook.com/plugins/like.php?href=http://YOURWEBSITE.COM{"products.view?product_id=`$product.product_id`"|fn_url}&layout=box_count&show_faces=true&width=120&action=recommend&colorscheme=light&height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:120px; height:65px;" allowTransparency="true"></iframe>
```<br />
<br />
5 - I pasted it on line 19 of "default_template.tpl" to have my "Like" Facebook button under the product image:<br />
<br />
<br />
<br />
![](upload://8KjfQMmX1HhXDuR2absDZvUrCRC.jpeg)<br />
<br />
That's all folk's!<br />
<br />
<br />
Lee Li Pop[/QUOTE]<br />
<br />
Hi Lee Li<br />
<br />
I pasted the code as specified in Line 19 of default_template.tpl but the Like button does not show.<br />
<br />
Using 2.1.4<br />
<br />
Any idea ?
I pasted the code as specified in Line 19 of default_template.tpl but the Like button does not show.
Using 2.1.4
Any idea ?[/QUOTE]
Be aware, I use 2.1.2, and I tweak a lot my skin. For sure, you need to try another line of code.
My advices can’t be fit for all, because changes from one version to another and from one skin to another are too differents. So, the advice that I bring to the CS-Cart’s comunity can’t be universal.
I hope you understand that I am sincerely sorry for not being able to help you more.
[quote name='Lee Li Pop' timestamp='1305574571' post='112453']
Hello JGift,
Be aware, I use 2.1.2, and I tweak a lot my skin. For sure, you need to try another line of code.
My advices can't be fit for all, because changes from one version to another and from one skin to another are too differents. So, the advice that I bring to the CS-Cart's comunity can't be universal.
I hope you understand that I am sincerely sorry for not being able to help you more.
Lee Li Pop
[/quote]
Hi Lee Li,
Thanks for the instructions. Were you able to work out how to get the correct product image to be displayed in the 'like' post? When I 'like' a product, it picks up and displays an image that is part of my skin.
I have followed the examples om this thread and tried most of them.
Most of these solutions were showing on Facebook the main page of my site even though I was clicking the “Like” button from a product details page.
The solution that did the trick for me (I have SEO enabled) was:
Unfortunately, the photo posted with this on Facebook is wrong. The image is from the "captcha" functionality ..
Can anyone post a solution on hoe to get the product thumbnail sent to facebook when clicking the "Like" button?
Thank you in advance!
[/quote]
this did the trick for me with the right image sent to facebook.
i will use it as i can't use the facebook addon cause facebook don't allow me to get an App ID yet.(i dont know why,but i am searching it)
Make sure you don't have an overwrite for your meta.tpl file.
for example, if you have cscartrocks canonical url add-on, you need to edit skins/YOUR_SKIN/customer/addons/canonical_url/hooks/index/meta.override.tpl
I still don't get why you guys don't use cs-carts facebook add-on btw… works like a charm on all my sites… I did have to edit the file I mention above though.