Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento在特定cms页面中呼叫客户的名字_Magento_Variables_Echo - Fatal编程技术网

Magento在特定cms页面中呼叫客户的名字

Magento在特定cms页面中呼叫客户的名字,magento,variables,echo,Magento,Variables,Echo,我试着在一页上称呼顾客的名字。该页面已被限制为仅登录成员。所以,如果您试图访问该页面,但尚未登录,您将被重定向到登录页面 如何在一个特定的CMS页面上呼叫、回显或显示登录客户的名字 我是一个想学magento的笨蛋。非常感谢您的帮助。在.phtml文件中获取客户名称 echo Mage::helper('customer')->getCustomerName(); 阅读更多@ 为了在cms页面中获得客户名称,我将使用 {{block type="core/template" te

我试着在一页上称呼顾客的名字。该页面已被限制为仅登录成员。所以,如果您试图访问该页面,但尚未登录,您将被重定向到登录页面

如何在一个特定的CMS页面上呼叫、回显或显示登录客户的名字


我是一个想学magento的笨蛋。非常感谢您的帮助。

在.phtml文件中获取客户名称

   echo Mage::helper('customer')->getCustomerName();
阅读更多@

为了在cms页面中获得客户名称,我将使用

 {{block type="core/template" template="path/to/file/customer_name.phtml"}}

阅读更多@

Magento客户名字登录用户

$session = Mage::getSingleton('customer/session');

if($session->isLoggedIn())
{
    $customer = $session->getCustomer();
    echo $customer->getFirstname();
}
尝试实现上述代码以显示CMS页面上的客户名字