Adding simple Tweet this for Magento products
5 October 2009
No Comment

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:

Leave your response!