Showing posts with label Magneto. Show all posts
Showing posts with label Magneto. Show all posts

Sunday 15 March 2015

Unable to process payment. Please contact the merchant as the shipping address provided by the merchant is invalid, and the merchant has requested that your order must be shipped to that address Magento


Unable to process payment. Please contact the merchant as the shipping address provided by the merchant is invalid, and the merchant has requested that your order must be shipped to that address.

Open the below file
\app\code\core\Mage\Paypal\Model\Api\Standard.php line:238  

$request['address_override'] = 1;

Changed it to '0' and check.

Tuesday 9 December 2014

Add footer in pdf invoice magento


Add footer in pdf invoice magento

Here i will explain you how to draw footer in pdf invoice. First of open the Invoice.php file.

app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php

Copy below function and paste it in invoice.php at last.

protected function _drawFooter(Zend_Pdf_Page $page)
    {
        /* Add table foot */
        $this->_setFontRegular($page, 8);
        $this->y -= 10;
        $page->setFillColor(new Zend_Pdf_Color_RGB(0, 0, 0));
$page->drawLine(25, $this->y-20, 570, $this->y-20);

        $page->drawText(Mage::helper('sales')->__('Amount Chargeable including sales Tax/Vat Applied as per Ankleshwar Govt.'), 35, $this->y-50, 'UTF-8');
$page->drawText(Mage::helper('sales')->__('Company VAT/TIN :'), 35, $this->y-65, 'UTF-8');
$page->drawText(Mage::helper('sales')->__('XXXXXXXX'), 175, $this->y-65, 'UTF-8');
$page->drawText(Mage::helper('sales')->__('Company PAN :'), 35, $this->y-80, 'UTF-8');
$page->drawText(Mage::helper('sales')->__('XXXXXXXXX'), 175, $this->y-80, 'UTF-8');
$page->drawText(Mage::helper('sales')->__('Registered Address :'), 35, $this->y-95, 'UTF-8');
$page->drawText(Mage::helper('sales')->__('2/1970, Rudarpura, malifalia, Surat - 395002(INDIA)'), 175, $this->y-95, 'UTF-8');

$page->drawText(Mage::helper('sales')->__('This is a system generated receipt.Signatures are not required'), 340, $this->y-110, 'UTF-8');

$page->drawLine(25, $this->y-130, 570, $this->y-130);

    }

Now put this line in getPdf() function after totals block

$this->_drawFooter($page);

Now check your PDF Invoice and Enjoy Chandresh rana's Coding....