acidvertigo Posted November 9, 2009 Share Posted November 9, 2009 Hello, I'want to control the thumbnail that facebook show when a user share a link on my site. Following this directive: Facebook Meta tags I need that in the meta tag: <link rel="image_src" href="http://www.example.com/catalog/images/product_picture.jpg" /> in my product_info.php page points directly to the image of my product generated is this possible? Link to comment Share on other sites More sharing options...
Ken44 Posted September 5, 2010 Share Posted September 5, 2010 Hi I realise that this thread is very old; however it is the only one I found in a Google search so I will post the solution here. I have installed Social Bookmarks from the code of osCv2.3 at Github and the wrong image was displayed on Facebook. The solution is to add a link to the default image to the Product_info Header between <head> and </head> (or template top in v2.3) <link rel="image_src" href="<?php echo tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) ?>" > Hope this helps someone who is searching for the answer in the future. Regards Ken Link to comment Share on other sites More sharing options...
FIMBLE Posted September 5, 2010 Share Posted September 5, 2010 Nice one Ken, thanks for sharing Sometimes you're the dog and sometimes the lamp post [/url] My Contributions Link to comment Share on other sites More sharing options...
John P Posted September 12, 2010 Share Posted September 12, 2010 Hi I realise that this thread is very old; however it is the only one I found in a Google search so I will post the solution here. I have installed Social Bookmarks from the code of osCv2.3 at Github and the wrong image was displayed on Facebook. The solution is to add a link to the default image to the Product_info Header between <head> and </head> (or template top in v2.3) <link rel="image_src" href="<?php echo tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) ?>" > Hope this helps someone who is searching for the answer in the future. Regards Ken Thanks Ken you are helping to me on the way. In the source code the path to my product images shows up in the <link rel="image_src" link but this stops wiith /images and not absoltue link to my product is found. How can I integrate the Product ID in this tag so the absolute link will be present for FB? Regards, John Link to comment Share on other sites More sharing options...
maxemus Posted December 7, 2010 Share Posted December 7, 2010 Thanks Ken you are helping to me on the way. In the source code the path to my product images shows up in the <link rel="image_src" link but this stops wiith /images and not absoltue link to my product is found. How can I integrate the Product ID in this tag so the absolute link will be present for FB? Regards, John <link rel="image_src" href="<?php echo tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) ?>" > I think the problem lies in $product_info['products_image'] is not defined yet in the head section of the page. Later in the page the sql is asserted to define it. the question is How to get $product_info['products_image'] defined in the header section? Any Ideas on how to get this done. I have other $product_info things working in the head section. Link to comment Share on other sites More sharing options...
RicardoFreitas Posted December 18, 2010 Share Posted December 18, 2010 <link rel="image_src" href="<?php echo tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) ?>" > I think the problem lies in $product_info['products_image'] is not defined yet in the head section of the page. Later in the page the sql is asserted to define it. the question is How to get $product_info['products_image'] defined in the header section? Any Ideas on how to get this done. I have other $product_info things working in the head section. Hi, Anyone found a solution for this? Thnaks. Link to comment Share on other sites More sharing options...
Xpajun Posted December 18, 2010 Share Posted December 18, 2010 Hi, Anyone found a solution for this? Thnaks. osC 2.3.1... works for me My store is currently running Phoenix 1.0.3.0 I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 ) I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary Link to comment Share on other sites More sharing options...
piperman Posted January 22, 2011 Share Posted January 22, 2011 Still looking for a fix for this. Surely it cant be that difficult. I have the share to facebook working, but it does not add the prodcut image from that page, facebook adds the (gives a choice) of the images in colunm right and colnum left and footer, but not the product_info. Any help would be great Piperman Link to comment Share on other sites More sharing options...
SimoNtpf Posted March 30, 2011 Share Posted March 30, 2011 <link rel="image_src" href="<?php echo tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) ?>" > I think the problem lies in $product_info['products_image'] is not defined yet in the head section of the page. Later in the page the sql is asserted to define it. the question is How to get $product_info['products_image'] defined in the header section? Any Ideas on how to get this done. I have other $product_info things working in the head section. Anyone solved the problem how to use $product_info['products_image'] in header section? Please help me with this. Link to comment Share on other sites More sharing options...
SierraTango Posted May 10, 2011 Share Posted May 10, 2011 I am also looking for a solution to this. If anyone is kind of enough to share a fix, it would be greatly appreciated. Link to comment Share on other sites More sharing options...
SierraTango Posted May 10, 2011 Share Posted May 10, 2011 OK, I found a solution, but it will require you to be running the STS contribution. 1. Put this in includes/modules/sts_inc/product_info.php: $sts->template['image_src'] = '<link rel="image_src" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '">'; (make sure product_info.php has the appropriate $product_info query and that the above code is underneath it) 2. Put this in the <head> of includes/sts_templates/product_info.php.html: $image_src$ The output of link rel should now have the product image and should display once Liked. Confirmed working on oSC 2.2 rc2a. Link to comment Share on other sites More sharing options...
Guest Posted May 10, 2011 Share Posted May 10, 2011 Try this in your head section: <? $product_pic_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $product_pic = tep_db_fetch_array($product_pic_query); if (tep_not_null($product_pic['products_image'])) { $products_image = '<link rel="image_src" href="' . tep_href_link(DIR_WS_IMAGES . $product_pic['products_image']) . '">'; } else { $products_image = ''; } ?> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.