Total Posts: 113
we are sending license keys via invoice email in our shop.
I have done it by adding some PHP code to app\design\frontend\default\default\template\email\order\items\invoice\default.phtml because it is associated to a product. A custom attribute defines if a code should be sent with a product. The relevant code is as follows:
$_products = Mage::getModel('catalog/product')->getCollection();
foreach($_products as $_product):
// check if product needs to send a license key with this email
It’s not the best code, it could be done in a module too, but it works fine. Generate your serial by some PHP function and output it in the following HTML.