rss
twitter
    Find out what I'm doing, Follow Me :)

Sunday, November 29, 2009

Pin It

Widgets

Set up the AddThis-button in your Magento theme

I’m sure many of you are big fans of the AddThis-button, that lets your users very easily add links to all major sites like Facebook, MySpace, blogs like Wordpress and Blogger plus it even let your users very easily send the page by email or print it out.

So, how do you add this great function to your Magento theme you might ask. Well its very simple. Just follow the steps below and you should be up running in no-time.

Step 1 – Create your AddThis-button

Go to http://www.addthis.com/web-button-select and create your own-styled AddThis-button, and then copy the code that is generated to your clipboard.

Step 2 – Add the code to your template-file

Open up your local template/catalog/view.phtml-file in Magento and find the following line:
                <h4><?php echo $this->__(’Quick Overview’) ?></h4>

Right above that line add a div style like this:
                <div style=”float:right;”>
                </div>

And paste the generated code in between that div-tag.

3 – Done

Well, thats actually it! If you run into any problems or have any suggestions around this functionality please feel free to add it as a comment in this article.

Source: http://www.silverthemes.com/

2 comments:

  1. Hi,

    This worked great when used exactly as described by you. But then I got ambitious and wanted to add-This also to the homepage and the category overwiev.

    For some reason it refuses to float right. Pls. see here:

    http://annsworld.de/magento/index.php/

    and here:
    http://annsworld.de/magento/index.php/ernahrung.html

    Anyideas as to what I am doing wrong??

    Thanks,

    Ann.

    ReplyDelete
  2. Hi,
    Great hint. Where would this code go if I want the integration on a category page/product list?
    Thanks,
    Jonas

    ReplyDelete