Magento remove promotional code in customer transa

2019-08-16 02:15发布

问题:

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



标签: magento