Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 2 of 2
var customer.name not working in newsletter subscription confirmation
 
tsunami
Jr. Member
 
Total Posts:  26
Joined:  2010-02-20
 

I created a bug:

http://www.magentocommerce.com/bug-tracking/issue?issue=10264

Please let me know if there’s anything I should add to the text.

Let’s hope this gets addressed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dokaisu
Jr. Member
 
Total Posts:  4
Joined:  2010-09-07
 

try this :
{{var order.customer_email}}
{{var order.customer_name}}
{{var order.customer_firstname}}

 
Magento Community Magento Community
Magento Community
Magento Community
 
tsunami
Jr. Member
 
Total Posts:  26
Joined:  2010-02-20
 

I posted a bug and Magento replied that the following should work.

{{var order.customer_email}}
{{var order.customer_name}}
{{var order.customer_firstname}}

Also suggested was this:

{{var subscriber.getSubscriberFullName()}}

I\’ve tested all of them and unfortunately they do not work.  I\’ll repost the bug and keep everyone updated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mambo magento
Jr. Member
 
Total Posts:  1
Joined:  2010-08-03
 

Hi all,

this bug seems to be still not sorted!!

is there anyway to work around, to get subscribers firstname, lastname....?

 
Magento Community Magento Community
Magento Community
Magento Community
 
andreboc
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2010-09-01
 

I’ve been testing the newsletter today and the variables aren’t working properly.

Also i had to use the following fix:
http://www.magentocommerce.com/boards/viewthread/199826/

News on the bug?

Cheers.
Andre.

 
Magento Community Magento Community
Magento Community
Magento Community
 
andreboc
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2010-09-01
 

{{var subscriber.CustomerFirstname}}
{{var subscriber.CustomerLastname}}
{{var subscriber.SubscriberEmail}}

That variables worked for me on 1.4.1.1

Just wondering which variable for password now!?

 
Magento Community Magento Community
Magento Community
Magento Community
 
loeffel
Guru
 
Avatar
Total Posts:  427
Joined:  2009-02-03
 

still not working for me…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lakshyami
Member
 
Avatar
Total Posts:  44
Joined:  2010-03-25
Sri Lanka
 

I have the same issue. How can we get the customer name at the newsletter confirm email? I’m using magento version 1.4.1.0.

I have tried following ways. But those are not working.

{{var customer.name}}
{{htmlescape var=$customer.name}}
{{var subscriber.name}}
{{htmlescape var=$customer.firstname}}
{{var subscriber.CustomerFirstname}}
{{var subscriber.getCustomerFirstname()}}
{{var subscriber.getSubscriberFullName()}}
{{var order.customer_name}}
{{var order.customer_firstname}}

Following one is worked, got the first part of email address
{{var name}}

Please help us....

Thanks in advance

 
Magento Community Magento Community
Magento Community
Magento Community
 
TECHeGO
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2010-06-30
Mesa, Arizona
 

I am having the same issue!

Magento 1.6.2.0
Transactional emails, Invoice PDF’s or anything that calls the below variables generates what is seen in the attached image!

Shipping Variable: {{var order.shipping_address.format(’html’)}}
Billing Variable: {{var order.billing_address.format(’html’)}}

ANY ASSISTANCE WOULD BE HUGE!!!

Image Attachments
emails_invoices.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
sebahat
Jr. Member
 
Total Posts:  3
Joined:  2011-07-25
 
TECHeGO - 29 February 2012 09:26 AM

I am having the same issue!

Magento 1.6.2.0
Transactional emails, Invoice PDF’s or anything that calls the below variables generates what is seen in the attached image!

Shipping Variable: {{var order.shipping_address.format(’html’)}}
Billing Variable: {{var order.billing_address.format(’html’)}}

ANY ASSISTANCE WOULD BE HUGE!!!

The same here for me but don’t know where to look at

 
Magento Community Magento Community
Magento Community
Magento Community
 
sebahat
Jr. Member
 
Total Posts:  3
Joined:  2011-07-25
 
TECHeGO - 29 February 2012 09:26 AM

I am having the same issue!

Magento 1.6.2.0
Transactional emails, Invoice PDF’s or anything that calls the below variables generates what is seen in the attached image!

Shipping Variable: {{var order.shipping_address.format(’html’)}}
Billing Variable: {{var order.billing_address.format(’html’)}}

ANY ASSISTANCE WOULD BE HUGE!!!

I hope i can help you i got the same issue and now i found the table that caused this bug, it’s when you go on another server and copy the database from one to the other you get a strange replication and some change comes in the table (for me) : “Customer Eav Attribute Website”

you have to check that the value of the columns : “is_visible Is Visible” “is_required Is Required” “default_value Default Value” “multiline_count” at every (records) must be “NULL” and not “0” like i had it.

best regards,

 
Magento Community Magento Community
Magento Community
Magento Community
 
milad
Jr. Member
 
Total Posts:  3
Joined:  2008-12-23
 

Where can i get fully list of these variables ?!

i have Tried This : http://www.magentocommerce.com/wiki/modules_reference/english/mage_adminhtml/system_email_template/index

but it is not complete !!

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
hooiyijun
Jr. Member
 
Total Posts:  1
Joined:  2010-01-20
 

Hi All,

I think the solution is that you want to manual add the new code in Subscriber.php.
if you cannot find the below folder 1, then, you maybe search folder 2. The folder 1 is overwritten than folder 2.

folder 1: /app/code/local/Mage/Newsletter/Model/Subscriber.php
folder 2: /app/code/core/Mage/Newsletter/Model/Subscriber.php

Step 1: Add the below code in bottom part from this file Subscriber.php
public function getSubscriberFullName2()
{
$name = null;

if(Mage::helper(’customer/data’)->isLoggedIn()){
$userinfo = Mage::getSingleton(’customer/session’)->getCustomer();
$name = $userinfo->getPrefix().” “.$userinfo->getFirstname().” “.$userinfo->getLastname();
}
else
{
$this->_customer = Mage::getModel(’customer/customer’)->load($this->getCustomerId());
$name = $this->_customer->getName();
}

return $name;
}

Step 2:
After added, you need to refresh cache from admin backend. (Admin -> System -> Cache Management -> Select All -> Action (Refresh) -> Submit).

Step 3:
In System -> Transactional Emails -> Select One Template (Success Email Template or Unsubscription Email Template) -> Template Content -> Add code {{var subscriber.getSubscriberFullName2()}}.

Step 4:
Test your Subscription Function. The method getSubscriberFullName2 is creased by us just now. Use to read customer name with their title.

Regards,
Jun

 
Magento Community Magento Community
Magento Community
Magento Community
 
manugerino
Jr. Member
 
Total Posts:  4
Joined:  2013-06-27
 

Still not working.
I followed exactly the instructions below, but they create a T_PUBLIC error.

hooiyijun - 04 October 2012 05:32 PM

Hi All,

I think the solution is that you want to manual add the new code in Subscriber.php.
if you cannot find the below folder 1, then, you maybe search folder 2. The folder 1 is overwritten than folder 2.

folder 1: /app/code/local/Mage/Newsletter/Model/Subscriber.php
folder 2: /app/code/core/Mage/Newsletter/Model/Subscriber.php

Step 1: Add the below code in bottom part from this file Subscriber.php
public function getSubscriberFullName2()
{
$name = null;

if(Mage::helper(’customer/data’)->isLoggedIn()){
$userinfo = Mage::getSingleton(’customer/session’)->getCustomer();
$name = $userinfo->getPrefix().” “.$userinfo->getFirstname().” “.$userinfo->getLastname();
}
else
{
$this->_customer = Mage::getModel(’customer/customer’)->load($this->getCustomerId());
$name = $this->_customer->getName();
}

return $name;
}

Step 2:
After added, you need to refresh cache from admin backend. (Admin -> System -> Cache Management -> Select All -> Action (Refresh) -> Submit).

Step 3:
In System -> Transactional Emails -> Select One Template (Success Email Template or Unsubscription Email Template) -> Template Content -> Add code {{var subscriber.getSubscriberFullName2()}}.

Step 4:
Test your Subscription Function. The method getSubscriberFullName2 is creased by us just now. Use to read customer name with their title.


Regards,
Jun

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 2