jcadima
1/13/2017 - 6:56 PM

Custom Social Links Share - Magento

Custom Social Links Share - Magento


https://codepen.io/JonDCarey/pen/wAjrx

<?php // get the current title of the page
$currentUrl = Mage::helper('core/url')->getCurrentUrl();
?>
<!-- Social Icons -->
<ul id="social_side_links">
  <li>
  <a style="background-color: #3c5a96;" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $currentUrl; ?>"  onclick="javascript:void window.open(this.href,'','width=600,height=300,resizable=true,left=200px,top=200px');return false;"><img src="https://dl.dropboxusercontent.com/u/78039576/CodePen/facebook-icon.png" alt="" /></a>
  </li>
  
  
  <li><a style="background-color: #1dadeb;" href="https://twitter.com/intent/tweet?text=SlimSpa&url=<?php echo $currentUrl; ?>" onclick="javascript:void window.open(this.href,'','width=600,height=300,resizable=true,left=200px,top=200px');return false;"><img src="https://dl.dropboxusercontent.com/u/78039576/CodePen/twitter-icon.png" alt="" /></a></li>
  
  
  <li><a style="background-color: #1178b3;" href="https://www.linkedin.com/cws/share?url=<?php echo $currentUrl; ?>" onclick="javascript:void window.open(this.href,'','width=600,height=300,resizable=true,left=200px,top=200px');return false;"><img src="https://dl.dropboxusercontent.com/u/78039576/CodePen/linkedin-icon.png" alt="" /></a></li>
</ul>




see more icons reference from wordpress:

<ul class="social-list">
   <li class="box"><a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo get_the_permalink(); ?>" onclick="javascript:void window.open(this.href,'','width=600,height=300,resizable=true,left=200px,top=200px');return false;"><i class="fa fa-facebook"></i></a></li>
   <li class="box"><a href="https://twitter.com/intent/tweet?text=<?php echo get_the_title(); ?>&url=<?php echo get_the_permalink(); ?>" onclick="javascript:void window.open(this.href,'','width=600,height=300,resizable=true,left=200px,top=200px');return false;"><i class="fa fa-twitter"></i></a></li>
   <li class="box"><a href="https://www.linkedin.com/cws/share?url=<?php echo get_the_permalink(); ?>" onclick="javascript:void window.open(this.href,'','width=600,height=300,resizable=true,left=200px,top=200px');return false;"><i class="fa fa-linkedin"></i></a></li>
   <li class="box"><a href="https://plus.google.com/share?url=<?php echo get_the_permalink(); ?>" onclick="javascript:void window.open(this.href,'','width=600,height=300,resizable=true,left=200px,top=200px');return false;"><i class="fa fa-google-plus"></i></a></li>
</ul>