X hide

Magento Facebook Like Discount Extension v1.x Developers Guide and API Reference

From Plumrocket Documentation

You are viewing:  Magento-facebook-discount-extension-magento2.png  Facebook Like Discount

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'); ?>
Navigation