Magento删除客户交易电子邮件中的促销代码 [英] Magento remove promotional code in customer transactional emails
问题描述
我的客户不希望他的客户拥有他们曾经使用的促销代码的副本,以最大程度地减少他们创建新帐户并再次使用它的机会.我正在查看发票和订单收据的交易电子邮件,并且只引用了order.getIsNotVirtual(),我假设其中会插入有关订单的详细信息.我将如何定位对促销代码本身的引用?
My client does not want his customers to have a copy of the promotional code they used to minimize the chance they would create a new account and use it again. I am viewing the invoice and order receipt transactional emails, and there is only reference to order.getIsNotVirtual() which I assume inserts details about the order. How would I go about locating reference to the promotional code itself?
推荐答案
您必须像这样编辑电子邮件的布局:
You have to edit the layout of email like this :
<sales_email_order_items>
<reference name="order_totals"><action method="setTemplate"><template>sales/mytotals.phtml</template></action></reference>
</sales_email_order_items>
然后将重复的sales/totals.phtml复制到mytotals.phtml,并使用以下代码删除折扣代码:
Then duplicate sales/totals.phtml to mytotals.phtml and remove the discount code with something like :
if ($_code!='discount')
这是用于订单模板的,请查看sales.xml布局以查找有关其他电子邮件的信息
This is for the order template, look at the sales.xml layout to find information about other emails
这篇关于Magento删除客户交易电子邮件中的促销代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!