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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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>
Then duplicate sales/totals.phtml to mytotals.phtml and remove the discount code with something like :
if ($_code!='discount')
This is for the order template, look at the sales.xml layout to find information about other emails