Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
Page 1 of 2
Invoice generated with errors
 
patriveri
Jr. Member
 
Total Posts:  29
Joined:  2008-02-23
 

Hello,

I recently upgraded to version 1.1.2.

When generating an invoice I get the following errors:

o Can not save invoice
o Can not do invoice for order

The order is invoiced but the customer does not get the email. I’ve dug through the code and found that the first error is generated when an exception is thrown in saveAction (in InvoiceController.php). It appears that $transactionSave->save()is the culprit, although I cannot tell from the sql logs where it’s going wrong.

Has anyone seen anything similar? Any ideas how to to troubleshoot further?

Thanks,
Patricio

 
Magento Community Magento Community
Magento Community
Magento Community
 
patriveri
Jr. Member
 
Total Posts:  29
Joined:  2008-02-23
 

It turns out that the email template was failing (email/order/items_invoice.phtml is now email/order/invoice/items.phtml).

A better crafted error message would have helped.

-patricio

 
Magento Community Magento Community
Magento Community
Magento Community
 
russell2pi
Jr. Member
 
Total Posts:  25
Joined:  2008-07-19
 

Thanks .. got the same problem, and got half way through finding the source (starting by adding $e->getMessage() to the error message!!) . Your post has saved me some time!

The new shipment and credit memo templates also need fixing.

I would like to know, is every new version going to break a million things like this? I think I will stick with this version indefinitely.

 
Magento Community Magento Community
Magento Community
Magento Community
 
russell2pi
Jr. Member
 
Total Posts:  25
Joined:  2008-07-19
 

Hmmm , ok, not so fast.

I am getting no items showing up in the invoice or shipment emails. Do you have the same problem?

I am stabbing in the dark here trying to understand what’s going on. I notice that both the My Account invoice code and the email invoice code now use a specific artitecture for item rendering.  It works fine in the My Account case but not in the email case.

I’d hazard a guess that the problem is that the email template calls the code via

{{block type='core/template' area='frontend' template='email/order/invoice/items.phtml' invoice=$invoice order=$order}}

which probably does not pick up the renderer definition in sales.xml:

<sales_email_order_invoice_items>
        <
block type="sales/order_email_invoice_items" name="items" template="email/order/invoice/items.phtml">
            <
action method="addItemRender"><type>default</type><block>sales/order_email_items_default</block><template>email/order/items/invoice/default.phtml</template></action>
        </
block>
    </
sales_email_order_invoice_items>

I tried to get it to pick it up using:

{{block type='sales/order_email_invoice_items' area='frontend' invoice=$invoice order=$order}}

but email/order/invoice/items.phtml never gets invoked with this. So then I tried telling it where to find it,

{{block type='sales/order_email_invoice_items' template='email/order/invoice/items.phtml' area='frontend' invoice=$invoice order=$order}}

but then I get the “can not save invoice” error. Printing Exception::getMessage(), the error is:

Recoverable Error: Argument 1 passed to Mage_Checkout_Block_Cart_Item_Renderer::setItem() must be an instance of Mage_Sales_Model_Quote_Item_Abstract, instance of Mage_Sales_Model_Order_Invoice_Item given, called in /home/huntingb/public_html/app/code/core/Mage/Sales/Block/Items/Abstract.php on line 114 and defined in /home/huntingb/public_html/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer.php on line 38

... and this is where I have to throw my hands up and hope that someone less clueless than me can help!!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
russell2pi
Jr. Member
 
Total Posts:  25
Joined:  2008-07-19
 

Doh, ok, worked it out. More complicated changes are necessary to the email templates… but, the default templates have been updated!

The offending code in the invoice case is replaced with

{{layout area="frontend" handle="sales_email_order_invoice_items" invoice=$invoice order=$order}}

I suppose it will be a matter of opening up the corresponding default templates and cutting and pasting the corresponding chunks from each one.

(Great, another hour of work to do as a result of this unwanted “upgrade”.)

 
Magento Community Magento Community
Magento Community
Magento Community
 
patriveri
Jr. Member
 
Total Posts:  29
Joined:  2008-02-23
 

Glad you resolved your issue. These upgrades are not for the faint of heart!

 
Magento Community Magento Community
Magento Community
Magento Community
 
russell2pi
Jr. Member
 
Total Posts:  25
Joined:  2008-07-19
 

Stop the press, shipments still die if you add a comment. I have no idea why. The default template handles comments the same way, {{var comment}}

 
Magento Community Magento Community
Magento Community
Magento Community
 
bertjeb
Jr. Member
 
Total Posts:  6
Joined:  2008-09-22
 

Hi,

I recently upgraded to 1.1.6 , after a few struggles there’s still an important problem that looks like yours:

The order e-mails are arriving without the ordered items list. So the customer doesn’t get info on ‘item’ , ‘SKU’ ‘quantity’ , ‘subtotal’ , ‘Total’

I hope there will be someone with a simple suggestion or solution…

Thanks in advance !

 
Magento Community Magento Community
Magento Community
Magento Community
 
smurfs4sale
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2008-07-26
España
 

I have the same problem!

 Signature 

Spanish Smurfshop
Lo Estabas Buscando.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
trigem
Jr. Member
 
Total Posts:  4
Joined:  2008-05-11
 

Me too! :|

I’ve checked the invoice email template, the one that contains product details. It seems that product details are add with this line:

{{block type='core/template' area='frontend' template='email/order/items_invoice.phtml' invoice=$invoice order=$order}}

Anyway, it seems to be related with the invoice, so I don’t expect it working on order email.

Any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
augirl
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2008-07-21
 

Hi

I’m having the same problem… although, out of interest, I have just discovered that if you re-order from within admin on an order, the invoice does print the items, sku etc.  It just doesn’t print it on an order made on the site.  If someone can confirm this that would be great.

I’ll update here when I find out why.

 Signature 

----
Pia

 
Magento Community Magento Community
Magento Community
Magento Community
 
bertjeb
Jr. Member
 
Total Posts:  6
Joined:  2008-09-22
 

It seems that since the upgrade an extra folder/file is existing:

Before there was a folder

app/design/frontend/default/default/template/email/order
with the file items.phtml , items_shipment.phtml , items_invoice.phtml , shipment_track.phtml , items_creditmemo.phtml

which were used before for displaying the items in te e-mail order, I think ...

And now there seem to be some extra folders instead of the old phtml-files

app/design/frontend/default/default/template/email/order/items/order
app/design/frontend/default/default/template/email/order/items/invoice
app/design/frontend/default/default/template/email/order/items/shipment
app/design/frontend/default/default/template/email/order/items/creditmemo

each containing a file ‘ default.phtml ‘

I think this is were we have to look for our problem ???

I hope there will be some help soon, it seems the problem exists for other installations/upgrades too ...

 
Magento Community Magento Community
Magento Community
Magento Community
 
bertjeb
Jr. Member
 
Total Posts:  6
Joined:  2008-09-22
 

Anyone with a solution yet ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Aldo
Member
 
Total Posts:  46
Joined:  2008-02-19
 

Yes, also looking for a solution to this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
o0avb0o
Jr. Member
 
Total Posts:  16
Joined:  2008-05-23
 

same problem at my site. the invoice / order e-mails don’t include the purchased items an costs. switching to the default template didn’t solve the problem.

this is a serious bug: you can’t send e-mails to customers without an information about the costs of their order!

 
Magento Community Magento Community
Magento Community
Magento Community
 
coronac
Member
 
Avatar
Total Posts:  45
Joined:  2008-07-12
Florida
 

having the same problem with a client website.

We are unable to create invoices and shipments. Also the customer never gets and email from the backend.

Any help?

 Signature 

Serious About Magento? Then SimpleHelix is for you!

SimpleHelix Hosting - Fast Magento Hosting Solutions
█ Magento-One-Click-Installer And 24/7 Live Support
█ The #1 leader in High-Performance web hosting

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 2
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
50141 users|488 users currently online|102280 forum posts