<?php if (!empty($entity) && !empty($entity_type)): ?>
  <?php
  $uri = entity_uri($entity_type, $entity);
  $url = urlencode(url($uri['path'], array('absolute' => TRUE)));
  $title = !empty($entity->title) ? urlencode($entity->title) : '';
  $image = !empty($entity->content['product:field_image']['#items'][0]['uri']) ? file_create_url($entity->content['product:field_image']['#items'][0]['uri']) : FALSE;
  ?>
  <div class="share-buttons">
    <ul>
      <li><a href="#" class=""><?php print t('Share'); ?></a></li>
      <li class="share-facebook"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php print $url; ?>&amp;t=<?php print $title; ?>"><?php print t('Facebook'); ?></a></li>
      <li class="share-twitter"><a target="_blank" href="https://twitter.com/share?url=<?php print $url; ?>&amp;text=<?php print $title . ' ' . $url; ?>"><?php print t('Twitter'); ?></a></li>
      <li class="share-gplus"><a target="_blank" href="https://plus.google.com/share?url=<?php print $url; ?>&amp;title=<?php print $title ?>"><?php print t('Google+'); ?></a></li>
      <li class="share-gplus"><a target="_blank" href="http://pinterest.com/pin/create/button/?url=<?php print $url; ?>&amp;description=<?php print $title; ?>&amp;media=<?php print $image; ?>"><?php print t('Pinterest'); ?></a></li>
      <li class="share-linkedin"><a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=<?php print $url; ?>&title=<?php print $title; ?>&am&amp;summary=<?php print $title; ?>&amp;source="><?php print t('LinkedIn'); ?></a></li>
    </ul>       
  </div>
<div class="clearfix"></div>
<?php endif; ?>
