I've created a module that sends custom emails. I've tried to add a custom layout handle in the email template
{{layout handle="sales_email_order_items_no_price" order=$order}}
Where should I place the new layout? I know I shouldn't touch app/design/frontend/base/default/layout/sales.xml
I tried to place it in app/design/frontend/mypackage/default/etc/theme.xml
but it doesn't seem to be working.
Sorry for the beginner question.
Magento – Custom layout handle for email
email-templateslayout
Best Answer
I literally almost answered my own question:
I've placed it now in
app/design/frontend/mypackage/default/layout/sales.xml' and it seem to have worked.
local.xml' (no longer recommended), or theme.xml (for 1.9), that's why I got confused. Can anyone help me to understand in what cases theme.xml should be used rather than use the fall back to overload sales.xml? Thanks.Is that the right way to do it? I've read some articles custom layouts should go into
Further more, I'd like to load my own phtml in that layout handle, ie, I want to replace
email/order/items.phtml
andemail/order/items/order/default.phtml
with my own (under different name), where should they go?email/order/items.phtml
seem to live underapp/design/adminhtml/default/default/template/email/order
, not sure where I can place the alternative.