开发者

Add the customer's company in the new order Email

开发者 https://www.devze.com 2023-02-22 12:41 出处:网络
How can I add the cu开发者_开发问答stomer\'s company to the customer address (in the new order Email)?In the file app/code/core/Customer/etc/config.xml, Magento defines the formats for addresses. If y

How can I add the cu开发者_开发问答stomer's company to the customer address (in the new order Email)?


In the file app/code/core/Customer/etc/config.xml, Magento defines the formats for addresses. If you want to modify all html-formatted addresses to contain company info, you can override this file (specifically, the path default/customer/address_templates/html):

<html><![CDATA[{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}<br/>
{{depend company}}{{var company}}<br />{{/depend}}
{{if street1}}{{var street1}}<br />{{/if}}
{{depend street2}}{{var street2}}<br />{{/depend}}
{{depend street3}}{{var street3}}<br />{{/depend}}
{{depend street4}}{{var street4}}<br />{{/depend}}
{{if city}}{{var city}},  {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}<br/>
{{var country}}<br/>
{{depend telephone}}T: {{var telephone}}{{/depend}}
{{depend fax}}<br/>F: {{var fax}}{{/depend}}]]></html> 

Otherwise, you could create your own module and add a new address format in your XML config file. Then, you would need to modify your email templates to use the new format:

{{var order.getBillingAddress().format('yourformat')}}
0

精彩评论

暂无评论...
验证码 换一张
取 消