【发布时间】:2019-09-25 13:15:14
【问题描述】:
在 Magento 1.9 中,我想在 Mage_Adminhtml_Block_Customer_Edit_Tab_View 中获取已打开客户的 customerId。
我试过这样:
$customer_session = Mage::getSingleton('customer/session'); //I saw here in Stackoverflow this
$customer = $customer_session->getCustomer();
$customerID = $customer->getId();
但我得到了一个空值。
我也尝试了$this->getId() 和Mage::helper('customer')->getId(),但都没有成功。
如何做到这一点?
【问题讨论】:
标签: magento admin magento-1.9