Kriter.io Posted December 12, 2011 Share Posted December 12, 2011 I have the module socialbookmarkforproducts and when i try to connect and share the product on Facebook it works displayng the link, but i'd like also to show the main picture. What should i do? thks Link to comment Share on other sites More sharing options...
shacker Posted December 17, 2011 Share Posted December 17, 2011 is a problem from the module. you need to add a code in your header to show this. Search a facebook like module to see how implement it Link to comment Share on other sites More sharing options...
Kriter.io Posted December 17, 2011 Author Share Posted December 17, 2011 I'm not a programmer, can you help me step by step??? i would appreciate. I've also tried to use your modules, but the result is the same. On single product it does not show the picture. can you give a lokk to the link and tell me what to do? http://eroticgadget.it/product.php?id_product=4265 thanks Link to comment Share on other sites More sharing options...
Kriter.io Posted December 27, 2011 Author Share Posted December 27, 2011 can you tell me wichi code??? i found a I LIKE module but i do not know what to copy Link to comment Share on other sites More sharing options...
shacker Posted January 10, 2012 Share Posted January 10, 2012 add this code in header of your theme, in the metas <meta property="og:image" content="{$fl_default_image}" /> <link rel="image_src" href="{$fl_default_image}" /> and in your module, in the php file, in the hookHeader section add this code $fb_cover = ''; $protocol_link = @$_SERVER['HTTPS'] == "on"?"https://":"http://"; $cover = Product::getCover(intval(Tools::getValue('id_product'))); if (is_array($cover) && sizeof($cover) == 1) { $product = new Product((int)Tools::getValue('id_product')); if (floatval(substr(_PS_VERSION_,0,3)) >= 1.4) $fb_cover = $link->getImageLink($product->link_rewrite[$cookie->id_lang], Tools::getValue('id_product').'-'.$cover['id_image'],'thickbox'); else $fb_cover = 'http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'img/p/'.Tools::getValue('id_product').'-'.$cover['id_image'].'.jpg'; } $smarty->assign(array('fl_protocol_link' => $protocol_link, 'fl_lang_code' => $lang, 'fl_default_image' => $fb_cover)); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now