I'd like to include a QR code in the order confirmation for all orders with a specific payment method chosen. I'm not too sure where to start.

Currently the payment details section of the order confirmation contains exactly what you see during checkout (banking details etc. for an EFT-style payment).

Would appreciate any pointers.

2 Answers 2


If I'm not mistaken (could be, was a while back since I changed something in payment methods) each payment method has a block class Info and a corresponding info.phtml template.

For example, looking at moneybookers it has the class Phoenix_Moneybookers_Block_Info with the template moneybookers/info.phtml This is the file which is included in the emails so if you include the QR code there (or whichever payment method you want to change) it should be displayed correctly in the email.


You need to rewrite method sendNewOrderEmail of class Mage_Sales_Model_Order. You can specify your template depending on some conditions here (check order payment method):

    // Retrieve corresponding email template id and customer name
    if ($this->getCustomerIsGuest()) {
        $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_GUEST_TEMPLATE, $storeId);
        $customerName = $this->getBillingAddress()->getName();
    } else {
        $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE, $storeId);
        $customerName = $this->getCustomerName();

After you can create new mail template file from app/locale/en_US/template/email/sales/order_new.html and add QR code in it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.