Home » Magento Guide

Adding simple Tweet this for Magento products

5 October 2009 No Comment

Adding simple Tweet this for Magento products

There are few different ways one can achieve this kind of functionality. Normally in Magento you would do it like a real, “independent”, module (extension) thus loosing at least two ours to make a few lines of code work.

The simplest way to add this kind of feature to your product view page is to open the view.phtml file under the app/design/frontend/default/custom/template/catalog/product/ folder.

And add the following code where you sish to show your “Tweet this” link:

<a title="Send this page to Twitter!" href="http://twitter.com/home?status=Check out the <?php echo $this->htmlEscape($_product->getName()) ?> at < ?php echo $_product->getProductUrl() ?>" target="_blank">Tweet This!</a>

Thats it. Remember, this is truly the simplest solution, aka Quick & Dirty. For more fancy stuff… we do custom deevelopment :)

Cheers.

By Branko Ajzele from Inchoo.net

Related posts:

  1. Magento, products on sale
  2. More Flexible Approach for Listing Sale Products in Magento
  3. Simple product with custom options in grouped product in Magento
  4. Simple random banner rotator in Magento using static blocks
  5. Magento Menu Customization with Product List

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam Protection by WP-SpamFree

Security Code: