1

I have Magento 2.3.4 I want to show the "first name" and "country" field in the newsletter subscription form. Also, it would be for guests and customers as well. Both fields should be shown in the admin grid and that will be sent in emails as well.

How can I achieve this functionality?

2

You can take help from here.

Magento 2.2 - adding name field to newsletter module

In this solution they are adding FirstName and LastName to newsletter form, you should replace them with "First Name" and "country" fields at every occurrence.

3
  • 1
    I tried this and added country instead of the last name but in my project, there is a subscribe.phtml is already loading from diff place, from theme "app/design/frontend/theme/name/Magento_Newsletter/subscribe-footer.phtml" it does not override out phtml file. How can I do that? Aug 6 '20 at 10:30
  • Have you run the commands php bin/magento setup:di:compile && php bin/magento cache:flush ? Aug 6 '20 at 10:50
  • also check by adding code of app\code\Hm\Newsletters\view\frontend\templates - subscribe.phtml into "app/design/frontend/theme/name/Magento_Newsletter/subscribe-footer.phtml" if it works, take a backup of files first. Aug 6 '20 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.