Adding Facebook share button for products in osCommerce using Unishop_osCommerce Theme

osCommerce Version: 2.3.4

Theme used: Unishop_osCommerce_Theme_eTheme_v1.7.5

Install the theme according to Installation guide.

Edit the file: %osCommerce _Root%\product_info.php

 <div class="clearfix socials_plugins">
 <div class="google">
 <script type="text/javascript" src=""></script>
 <div class="g-plusone" data-size="medium" data-count="true"></div>
 <div class="facebook">
 <script>(function(d, s, id) {
 var js, fjs = d.getElementsByTagName(s)[0];
 if (d.getElementById(id)) return;
 js = d.createElement(s); = id;
 js.src = "//";
 fjs.parentNode.insertBefore(js, fjs);
 }(document, 'script', 'facebook-jssdk'));
 <div class="fb-like" data-send="false" data-layout="button_count" data-width="94" data-show-faces="false" data-font="arial"></div>
 <div class="facebook">
 $Url = (@$_SERVER["HTTPS"] == "on") ? "https://" : "http://";
 <div class="fb-share-button" data-href="<?php echo $Url; ?>" data-layout="button_count" data-size="small" data-mobile-iframe="true"><a target="_blank" href="<?php echo $Url; ?>" class="fb-xfbml-parse-ignore">Share</a></div>
 <div class="twitter">
 <a rel="nofollow" href="" class="twitter-share-button" data-count="horizontal" data-via="tonytemplates"></a><script type="text/javascript" src=""></script>

Sample File: product_info


Anup Chhetri

IT system administrator

You may also like...

error: Content is protected !!