Friday, August 17, 2012

Magento:: how to move Email To Friend form in product page


>> Move email to friend form to product details page ::

         1. Go to admin=>system=>configuration=>Email To Friend and change "Limit Sending By" cookie to IP.
         And change "Allow for Guests" to Yes.
       
         2. Add to catalog.xml layout (in content):
         <block type="sendfriend/send" name="sendfriend.send" template="sendfriend/send.phtml" />
       
         3. Add to view.phtml template page:
         <?php echo $this->getChildHtml('sendfriend.send');?>
       
         4. In Mage_Sendfriend_Block_Send block row159
                 replace the method :
        public function getSendUrl()
        {
            return Mage::getUrl('*/*/sendmail', array(
                'id'     => $this->getProductId(),
                'cat_id' => $this->getCategoryId()
            ));
        }

                  with...
        public function getSendUrl()
        {
            return Mage::getUrl('sendfriend/product/sendmail', array(
                'id'     => $this->getProductId(),
                'cat_id' => $this->getCategoryId()
            ));
        }
        
                  ***********         Good Luck        **********

No comments:

Post a Comment