Try the Demo

Magento

eCommerce Software for Online Growth

Magento Forum

Our new hosted solution for small & emerging businesses
   
Page 1 of 2
Invoice email not sent
 
Avi999
Jr. Member
 
Total Posts:  23
Joined:  2009-05-21
 

Hey

I’m on 1.3.2.3
I’m using only PayPal Express checkout
payment action=sale, new order status=processing

All seems to be OK
customer can order and pay and I get the payment.

Problem is that Magento does NOT send invoice to customer nor to us
(invoice and invoice comments are enabled in admin and we are on the Bcc setup of both)

if I go to invoices it is marked as:

Invoice #300000002 | Paid (Invoice email not sent)

And above all, Magento does not have any option to resend invoice
so out of printing it, I have no invoice nor the customer.

I couldn’t find any solution
Can anyone help please ?

and speaking of printing, how the h*** do I force the invoice text to be larger or force a landscape
printing of the pdf magneto produces ? (we must send each customer a small microscope to see it grin
all landscape options of acrobat does not produce a larger image

Thanks a lot
A.

P.S. Order email is sent OK to customer and us as Bcc

 
Magento Community Magento Community
Magento Community
Magento Community
 
Avi999
Jr. Member
 
Total Posts:  23
Joined:  2009-05-21
 

am I the only one having this problem ????

A.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ecommerce-store
Sr. Member
 
Avatar
Total Posts:  181
Joined:  2008-04-16
Roma
 

I think that is a 1.3.2.3 bug

 Signature 

- Creazione e personalizzazione Ecommerce Magento
- Hosting ottimizzato per Magento
- Template grafici magento
- Moduli Magento

- Guarda i nostri lavori http://www.ecommerce-store.it/shop/portfolio
_________________________________________________________
http://www.ecommerce-store.it - Hosting - Template e Moduli per Magento

 
Magento Community Magento Community
Magento Community
Magento Community
 
Avi999
Jr. Member
 
Total Posts:  23
Joined:  2009-05-21
 

yaa, you are probably right

I reported it as a bug, and I see it on the roadmap so I guess we’ll have to wait for next release to solve it.

Tnx
A.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sylvain_Raye
Sr. Member
 
Avatar
Total Posts:  88
Joined:  2008-12-29
Zurich - Switzerland
 

Same problem for me with the same number version but I can’t wait. I try to find the solution.
Regards

 Signature 

Visit my free Magento Connect Extensions: Joomla Integration - Username Integration - JS/CSS Optimization - Zopim Chat Integration - and more

IT development manager for rissip.com - the marketplace platform for free and paid online courses.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Revilo
Member
 
Avatar
Total Posts:  65
Joined:  2009-03-19
 

It is a bug in that version, try changing your IPN to authorize and see if that fixes it.... confused

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sylvain_Raye
Sr. Member
 
Avatar
Total Posts:  88
Joined:  2008-12-29
Zurich - Switzerland
 

It is a bug in that version, try changing your IPN to authorize and see if that fixes it

It changes nothing, you receive only the confirmation of the order not the invoice.

There are two ways to do that:
- Put in the Mage_Paypal_Model_Standard class line 418 after $invoice->register()->pay();, you can put $invoice->sendEmail();
For me it works but there is a better way by using the events:
- For the events, you have to create an observer with start when the event sales_order_invoice_pay. This event is normally started at line 418 during the process $invoice->register()->pay() in the model Paypal file. I provide here the code.

Of course you have to activate the module in /app/etc/modules/Name_All.xml

In the folder /app/code/local/Name/Sales

etc/config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <
modules>
        <
Name_Sales>
            <
version>0.1.0</version>
        </
Name_Sales>
    </
modules>
    <global>
        <
models>
            <
sales>
                <
rewrite>
                    <
observer>Name_Sales_Model_Observer</observer>
                </
rewrite>
            </
sales>
        </
models>
        <
events>
            <
sales_order_invoice_pay>
                <
observers>
                    <
sales_notification_observer>
                        <
type>singleton</type>
                        <class>
sales/observer</class>
                        <
method>sendInvoiceEmail</method>
                    </
sales_notification_observer>
                </
observers>
            </
sales_order_invoice_pay>
        </
events>
    </global>
</
config>

Model/Observer.php

<?php
/**
 * Event sales_order_invoice_pay
 *
 */
require_once 'Mage/Sales/Model/Observer.php';
class 
Name_Sales_Model_Observer extends Mage_Sales_Model_Observer {
    
    
public function sendInvoiceEmail($observer{
            $invoice 
$observer->getEvent ()->getInvoice ();
            
            switch (
$invoice->getState ()) {
                
case Mage_Sales_Model_Order_Invoice::STATE_PAID :
                    
                    if (! 
$invoice->getOrder ()->getEmailSent ()) {
                        $invoice
->sendEmail ();
                    
}
                    
break;
            
}
        
return $this;
    
}
}

POST EDIT : change the code and provide a good one which works.

 Signature 

Visit my free Magento Connect Extensions: Joomla Integration - Username Integration - JS/CSS Optimization - Zopim Chat Integration - and more

IT development manager for rissip.com - the marketplace platform for free and paid online courses.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Avi999
Jr. Member
 
Total Posts:  23
Joined:  2009-05-21
 

diglin,

you refer and your solution is for standard PP
my report was of express PP !
only express is enabled in my admin, all other PP options are disabled.

how do I fix this in express PP ?

file app/code/core/Mage/Paypal/Model/Express.php does NOT have
$invoice->register()->pay();

tnx

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sylvain_Raye
Sr. Member
 
Avatar
Total Posts:  88
Joined:  2008-12-29
Zurich - Switzerland
 

Try my observer, it should work too. I provided two solutions, both works for paypal standard it’s true.
But in the paypal express you have to take aa look in the controller expressController.php, you will find in the function updateorderAction() the line $invoice->register()->capture(); it should does the same so here you can put the $invoice->sendEmail(); or use the observer. I cannot test the observer for paypal express but it should work and be the better solution in any case.

Good luck

 Signature 

Visit my free Magento Connect Extensions: Joomla Integration - Username Integration - JS/CSS Optimization - Zopim Chat Integration - and more

IT development manager for rissip.com - the marketplace platform for free and paid online courses.

 
Magento Community Magento Community
Magento Community
Magento Community
 
vesvello
Sr. Member
 
Total Posts:  85
Joined:  2007-12-01
 

My problem is similar, but in my case ORDER email is not sent and not invoice.

Any advise o that?

 
Magento Community Magento Community
Magento Community
Magento Community
 
vesvello
Sr. Member
 
Total Posts:  85
Joined:  2007-12-01
 

This is what I did to get order email confirmation:

I modified public function redirectAction in core/Mage/Paypal/controllers (around line 77) with this:

public function redirectAction()
    
{
        $session 
Mage::getSingleton('checkout/session');
        
$session->setPaypalStandardQuoteId($session->getQuoteId());
        
$order Mage::getModel('sales/order');
        
$order->load(Mage::getSingleton('checkout/session')->getLastOrderId());
                    
$order->sendNewOrderEmail();
                    
$order->save();


        
$this->getResponse()->setBody($this->getLayout()->createBlock('paypal/standard_redirect')->toHtml());
        
$session->unsQuoteId();
}

Now I got email but I still have the message “order confirmation email was not sent “ and “ Costumer no notified”

I added

$order->setEmailSent(true);

but still not working.

Any help?

 
Magento Community Magento Community
Magento Community
Magento Community
 
worley
Jr. Member
 
Total Posts:  8
Joined:  2009-03-19
 
Ecommerce-Store - 27 August 2009 08:41 AM

I think that is a 1.3.2.3 bug

It also happens in 1.3.2.4 and I reported it here back in May 2009: issue #6373.
6 months later it’s still showing as new.

 
Magento Community Magento Community
Magento Community
Magento Community
 
cwebnet
Member
 
Total Posts:  38
Joined:  2010-01-13
 
diglin - 04 September 2009 02:19 AM

It is a bug in that version, try changing your IPN to authorize and see if that fixes it

It changes nothing, you receive only the confirmation of the order not the invoice.

There are two ways to do that:
- Put in the Mage_Paypal_Model_Standard class line 418 after $invoice->register()->pay();, you can put $invoice->sendEmail();
For me it works but there is a better way by using the events:
- For the events, you have to create an observer with start when the event sales_order_invoice_pay. This event is normally started at line 418 during the process $invoice->register()->pay() in the model Paypal file. I provide here the code.

Of course you have to activate the module in /app/etc/modules/Name_All.xml

In the folder /app/code/local/Name/Sales

etc/config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <
modules>
        <
Name_Sales>
            <
version>0.1.0</version>
        </
Name_Sales>
    </
modules>
    <global>
        <
models>
            <
sales>
                <
rewrite>
                    <
observer>Name_Sales_Model_Observer</observer>
                </
rewrite>
            </
sales>
        </
models>
        <
events>
            <
sales_order_invoice_pay>
                <
observers>
                    <
sales_notification_observer>
                        <
type>singleton</type>
                        <class>
sales/observer</class>
                        <
method>sendInvoiceEmail</method>
                    </
sales_notification_observer>
                </
observers>
            </
sales_order_invoice_pay>
        </
events>
    </global>
</
config>

Model/Observer.php

<?php
/**
 * Event sales_order_invoice_pay
 *
 */
require_once 'Mage/Sales/Model/Observer.php';
class 
Name_Sales_Model_Observer extends Mage_Sales_Model_Observer {
    
    
public function sendInvoiceEmail($observer{
            $invoice 
$observer->getEvent ()->getInvoice ();
            
            switch (
$invoice->getState ()) {
                
case Mage_Sales_Model_Order_Invoice::STATE_PAID :
                    
                    if (! 
$invoice->getOrder ()->getEmailSent ()) {
                        $invoice
->sendEmail ();
                    
}
                    
break;
            
}
        
return $this;
    
}
}

POST EDIT : change the code and provide a good one which works.

HI diglin howdy,

you have post this 1 day after 1.3.2.4 release hey smile .

So i have the version 1.3.2.4 and i tried your solution ( Events) but the Invoice Email still not sent.
Have you another solution or maybe it’s me that have done this wrong?
Any feedback I appreciate.
BTW is PP Standard.

My best regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
cwebnet
Member
 
Total Posts:  38
Joined:  2010-01-13
 

Hey diglin, sorry it’s me again,
i tried your first solution :  I put $invoice->sendEmail(); AFTER $invoice->register()->pay(); and it works the email-invoice is sent but in the client email just apears

Your Invoice # for Order #100000020

this means the Invoice #No is not set wen email is sent.
This situation hapend with you some how?

Thanks
Regards

EDIT: basead in all tips in the forum i post where something

Part of the fix for paypal standard magento 1.3.2.4

 
Magento Community Magento Community
Magento Community
Magento Community
 
cannonballdex
Member
 
Avatar
Total Posts:  64
Joined:  2008-10-16
 

Just a little food for thought. I have used this program for a little over a year before I began to understand it.

It is a bug in that version, try changing your IPN to authorize and see if that fixes it

If you set this to Authorize instead of sale, you will have to log into PayPal to capture the funds as this only authorizes the payment. This would not change the situation of the customer getting the email or not from the magento admin.

Customer places order through your store and gets an order confirmation email, once the customer pays at PayPal the customer gets an email from PayPal that the order was paid. There is no reason to email an invoice once the order is paid.

This should update the status of the order to Processing. If you ship the item through PayPal you would then have to update the Magento Admin by clicking the Ship button and entering the tracking information. Again there would be no reason to send a confirmation email, because PayPal sends the email to the customer with the tracking information.

If you ship the item through another method that does not include using the customers email address, you would update the tracking information in the customers order and select email copy of shipment at the bottom right near the submit shipment button.

Not to be confused with processing your orders through PayPal Virtual Terminal or other third party processors.

 
Magento Community Magento Community
Magento Community
Magento Community
 
benz001
Sr. Member
 
Avatar
Total Posts:  221
Joined:  2009-02-05
Sydney
 

@diglin
thanks for the idea, the observer solution fits neatly and is working for me.

Couple of questions:
1) Why did you rewrite the model? As far as I’m aware there’s no need for that when implementing an observer, and my system is working fine without a rewrite.
2) The code above won’t record that the invoice has been sent, so in the back end you will still think that no email went and sends it before the invoice number has been assigned. You need to add a save() and setEmailSent(true) like this:

case Mage_Sales_Model_Order_Invoice::STATE_PAID :                  
                    if (! 
$invoice->getOrder()->getEmailSent()) {
                        $invoice
->save()
                            ->
sendEmail()
                            ->
setEmailSent(true);
                    
}
                    
break;;

 Signature 

Still has a soft spot for version 1.3.2.4

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 2
 
© Copyright 2012 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
701238 users|908 users currently online|497183 forum posts