Magento Forum

sales_email_order_invoice_items rewrite block problem in email
 
mugnagna
Jr. Member
 
Total Posts:  4
Joined:  2013-01-27
 

Hello to all the community, this is my first post.
I’m newbie in magento programming and I have this problem:
in admin area, in the email template I wrote {{layout area="frontend" handle="sales_email_order_invoice_items" invoice=$invoice order=$order}}
and I need to rewrite this block to change the items showed.
For this I rewrote the block class in local/Mypackage/Sales/config.xml:

<global>
        <
blocks>
            <
sales>
                <
rewrite>
                    <
order_email_invoice_items>Mypackage_Sales_Block_Order_Email_Invoice_Items</order_email_invoice_items>
                </
rewrite>
            </
sales>
        </
blocks>
. . .
</global>
and I created the template “design/frontend/mypackage/default/template/email/order/invoice/items.phtml”.
I don’t know why the block Mypackage_Sales_Block_Order_Email_Invoice_Items is read (I put a log into it) but not the template (it is taken the default “design/frontend/base/default/template/email/order/invoice/items.phtml").
Someone can help me please !!! thanks in advance.
 
Magento Community Magento Community
Magento Community
Magento Community
 
mbozek
Jr. Member
 
Total Posts:  7
Joined:  2012-06-04
Poland
 

Have you got enable your template in admin->system->configuration->design?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mugnagna
Jr. Member
 
Total Posts:  4
Joined:  2013-01-27
 

Oh great ! I love you !
I had set up the design for my stores in System -> Design but I had left “default” in System -> Configuration -> Design -> Package ( tongue rolleye ).
Now I change “default” -> “mypackage” and works!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top