Magento 1 Facebook Like Discount v1.x Developer Guide and API Reference

In this developer documentation for the Magento Facebook Like Discount Extension, you will find step-by-step instructions, sample code, and API references to fully customize your plugin.

Adding Facebook Buttons Manually

In order to change the place of “Facebook Like” buttons manually, follow the steps below:

1. Copy the file

/app/design/frontend/base/default/layout/facebookdiscount.xml

to

/app/design/frontend/PACKAGE_NAME/THEME_NAME/layout/facebookdiscount.xml

2. In new file change the following code:

<block type="facebookdiscount/like" name="shopping.cart.table.after"
    template="facebookdiscount/like.phtml" />

To this code:

<block type="facebookdiscount/like" name="facebookdiscount.like"
    template="facebookdiscount/like.phtml" />

3. In this file:

/app/design/frontend/PACKAGE_NAME/THEME_NAME/template/checkout/cart.phtml

In the place where you need the “Facebook Like” block to be displayed – add the following code:

<?php echo $this->getChildHtml('facebookdiscount.like'); ?>
Was this article helpful?