I have added an custom attribute to products. i want to show this attribute in order transaction email.
Is there a way to do this?
Thanks.
magento-1.7
I have added an custom attribute to products. i want to show this attribute in order transaction email.
Is there a way to do this?
Thanks.
Best Answer
An SO answer provides some great insight on this:
As the answer reveals, email items renderer will be working with order items, not the actual products. So if you've added this attribute to the product, then you can either:
Obviously the former is simpler, but will create some overhead processing that could impact performance. Once you choose your path there, you can proceed to the item renderer templates:
app/design/frontend/base/default/template/
:bundle/sales/order/items/renderer.phtml
sales/order/items/renderer/default.phtml
downloadable/sales/order/items/renderer/downloadable.phtml
There may be more, depending on what you have done to customize your installation. Also, the above only apply to front-end order item rendering. In any case, extend one or more of these templates to stuff in your attribute, eg:
Remembering that if your attribute is not available on the item model, you will have to load it from the product instead.