Tips of the day while using J2T Reward Social Add-on;)

If you wonder how to modify Facebook image and text while your customer click on like button with the module J2T Reward Social, you may want to modify the file path-to-your-theme/template/page/html/head.phtml in order to add the following:

<meta property=”og:url” content=”<?php echo htmlspecialchars(Mage::helper(‘core/url’)->getCurrentUrl())?>” />
<meta property=”og:title” content=”<?php echo htmlspecialchars($this->getTitle());?>” />
<meta property=”og:description” content=”<?php echo htmlspecialchars($this->getDescription()) ?>” />

<?php if (Mage::registry(‘current_product’)) : ?>
<meta property=”og:image” content=”<?php echo Mage::helper(‘catalog/image’)->init(Mage::registry(‘current_product’), ‘small_image’)->resize(100,100);?>” />
<?php else:?>
<meta property=”og:image” content=”DEFAULT_URL_IMAGE_OF_YOUR_CHOICE” />
<?php endif;?>

No wonder on which page your customers are, they will always have correct title, text and image while clicking on like button!

Leave a Reply

Your email address will not be published. Required fields are marked *