Product Sharing in Magento

Facebook

<a target="_blank" href="http://www.facebook.com/sharer.php?u=<?php echo $p_url;  ?>&t=Check+this+out"  class="addthis_button_preferred_1  class_social_facebook" title="Share on Facebook"></a>
 
Twitter
 
  <a target="_blank" title="Share on Twitter!" href="http://twitter.com/home?status= <?php echo $this->htmlEscape($product->getName()) ?> at <?php echo $p_url;  ?>"  class="addthis_button_preferred_2 class_social_twitter"></a>

Tumblr
 
<script src="http://platform.tumblr.com/v1/share.js"></script>
   <a target="_blank" href="http://www.tumblr.com/share" title="Share on Tumblr" class="addthis_button_preferred_3 class_social_print"></a>

Pinterest
   
   <a target="_blank" href="http://pinterest.com/pin/create/button/?media=<?php echo $this->helper('catalog/image')->init($product, 'small_image'); ?>&url=<?php echo $product->getProductUrl(); ?>" class="addthis_button_preferred_4 class_social_email"></a>
 
Googleplus share
     
   <a target="_blank" href="#" onclick="popUp=window.open('https://plus.google.com/share?url=<?php echo urlencode($p_url); ?>', 'popupwindow', 'scrollbars=yes,width=800,height=400');popUp.focus();return false" class="addthis_button_compact class_social_gmail"></a>


$p_url = $product->getProductUrl();

Comments

Popular posts from this blog

Adding Contact us link to Top Menu in Magento

Credit card number for Testing payment methods

Magento create invoice of specific order by programmatically