View Single Post
  #399  
Old 05-26-2011, 02:29 PM
 
dio2006 dio2006 is offline
 

Member
  
Join Date: Apr 2011
Posts: 11
 

Default Re: X-Cart Smart Template v4.4.x

i had some problems. if you press like' button it is showing like for all products not for just one which i want to like it. how can i fix it?

Quote:
Originally Posted by PhilJ
Anyone wanting to easily add a Facebook 'Like' button...

In skin/smart_template/custom/common.tpl

At the end, insert...
Code:
<meta property="og:title" content="{$product.producttitle|default:$product.product|escape}" /> <meta property="og:site_name" content="{$config.Company.company_name}" /> <meta property="og:image" content="{$product.image_url|default:$product.tmbn_url}" />
Then in skin/smart_template/customer/main/product_details.tpl

After...

Code:
<div class="ask-question"> {include file="customer/buttons/button.tpl" button_title=$lng.lbl_ask_question_about_product style="link" href="javascript: return !popupOpen(xcart_web_dir + '/popup_ask.php?productid=`$product.productid`')"} </div>
Insert...
Code:
<iframe src="http://www.facebook.com/plugins/like.php?href={$php_url.url|escape:"url"}&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:30px; margin-top:10px"></iframe>
Then run cleanup.php

Source | Demo

I don't have a Facebook account, so I can't test it personally
__________________
X-Cart
Reply With Quote