How to add firstname and lastname in magento newsletter subscription?

房东的猫 提交于 2019-12-13 19:07:53

问题


I am new to magento. Magento default have only email id for newsletter subscrption. How add the first name and last name in the newsletter subscription? I saw many tutorials. But they are not much clear. Help me to find out this?


回答1:


The problem is that in the newsletter_subscriber table there are no columns for first name or last name.

This has been addressed in the answer to this question:

Adding a custom field to Magento's subscription module




回答2:


There is a free extension, that adds fields for gender, firstname and lastname and makes it available in the backend grid for export via xml/csv: http://www.magentocommerce.com/magento-connect/extended-newsletter-subscription-for-guests.html

You can use both function variables {{var subscriber.getSubscriberFirstname()}} and {{var subscriber.getSubscriberLastname()}} in your email templates.

It will use the guests name entered in the extended subscription form or the customers name, if the user is logged in. The only thing is that if the user is logged in and fills out the extended subscription form with another email address than the one he has registered with, those two variables will return nothing.




回答3:


Go to System > Transactional Email > Choose one layout to edit. Use this var:

 {{var customer.lastname}}

See more at: http://www.mesmerlab.com/create-new-email-template-magento/



来源:https://stackoverflow.com/questions/12391817/how-to-add-firstname-and-lastname-in-magento-newsletter-subscription

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!