0

我需要以下帮助:

在 Magento 中,我创建了一个可配置的产品并为其分配了一些简单的产品。他们有一个单独的属性集,其中包含我创建的各个属性。

在订单审查页面上,显示产品名称以及选项 - 这很好。

在订单确认电子邮件中,仅显示产品名称和关联/订购产品的 SKU。我还需要显示属于我的产品的属性(我为描述特定产品而创建的属性,如长度、宽度等)。

任何帮助表示赞赏!谢谢!

4

2 回答 2

0

我知道这是一个老问题,但这是我必须做的。

// 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;
}

现在将输出属性的选项值。

于 2014-01-15T12:15:52.313 回答
0

您必须自定义订单确认电子邮件功能 sendNewOrderEmail() 的代码。

  Get attributes of a ordered products and  pass this to email template .
于 2013-08-31T11:55:33.690 回答