2014-01-21 80 views
0

我对magento &使用1.7版完全新。当客户下订单时,我想从订单电子邮件中删除sku号码。 R & D之后我注意到,使用的模板是从app/design/frontend/base/default/template/email/order/items.phtml和产品名称,SKU号码,数量和价格来自echo $this->getItemHtml($_item)这一行。我不完全知道,我应该如何从这一行删除sku号码列? 或者还有其他方法可以做到吗?从订单电子邮件中删除sku号码 - magento

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

回答

2

让我来向你解释所有的过程。

你可以在app/locale/en_US/template/email/sales/order_new.html找到订单邮件模板。 在这个文件中你可以找到这行{{layout handle="sales_email_order_items" order=$order}}在行号。 97

在此您可以看到句柄是“sales_email_order_items”,您可以在app \ design \ frontend \ base \ default \ layout \ sales.xml中找到该块。 268.

<sales_email_order_items> 
<block type="sales/order_email_items" name="items" template="email/order/items.phtml"> 
    <action method="addItemRender"><type>default</type><block>sales/order_email_items_order_default</block><template>email/order/items/order/default.phtml</template></action> 
    <action method="addItemRender"><type>grouped</type><block>sales/order_email_items_order_grouped</block><template>email/order/items/order/default.phtml</template></action> 
    <block type="sales/order_totals" name="order_totals" template="sales/order/totals.phtml"> 
     <action method="setLabelProperties"><value>colspan="3" align="right" style="padding:3px 9px"</value></action> 
     <action method="setValueProperties"><value>align="right" style="padding:3px 9px"</value></action> 
     <block type="tax/sales_order_tax" name="tax" template="tax/order/tax.phtml"> 
      <action method="setIsPlaneMode"><value>1</value></action> 
     </block> 
    </block> 
</block> 
<block type="core/text_list" name="additional.product.info" /> 

在该块中,你可以看到文件路径“电子邮件/顺序/ items.phtml(APP \设计\前台\基地\ DEFAULT \模板\电子邮件\命令\ items.phtml )“

在此文件中只评论此代码 <th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Sku') ?></th>在行号码。 33

现在在上面的块中,您可以看到另一个文件路径'email \ order \ items \ order \ default.phtml(app \ design \ frontend \ base \ default \ template \ email \ order \ items \ order \ default .phtml)'

在这个文件中,只需评论此代码<td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;"><?php echo $this->htmlEscape($this->getSku($_item)) ?></td>在行号。 48.

完成。

相关问题