I need help with the following:
In Magento I have created a configurable product and assigned some simple products to it. They have an individual attribute set with individual attributes that I have created.
On the order review page, the product name as well as the options are displayed - this is fine.
On the order confirmation email, only the product's name and the SKU of the associated/ordered product is displayed. I need to display the atttributes that belong to my product as well (the attributes, that I have created to describe that specific product, like length, width, etc.).
Any help is appreciated! Thanks!
您必须自定义订单确认电子邮件功能sendNewOrderEmail()的代码。
Get attributes of a ordered products and pass this to email template .
I know this is an old question but here is what I had to do.
// get array of super_attributes
$productOptions = $_item->getProductOptions();
$superAttributes = $productOptions['info_buyRequest']['super_attribute'];
// once you have super_attributes, loop through and load attribute information and output
foreach($superAttributes as $attribute => $option) {
$product = Mage::getModel('catalog/product')->setStoreId($_storeId)->setData($attribute,$option);
$option = $product->getAttributeText($attribute);
echo $option;
}
The option value for the attribute will now be output.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.