本文整理汇总了PHP中Mage_Customer_Model_Customer::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Customer_Model_Customer::load方法的具体用法?PHP Mage_Customer_Model_Customer::load怎么用?PHP Mage_Customer_Model_Customer::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Customer_Model_Customer
的用法示例。
在下文中一共展示了Mage_Customer_Model_Customer::load方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _getCustomer
/**
* Retrieve Customer instance
*
* @return Mage_Customer_Model_Customer
*/
protected function _getCustomer()
{
if (is_null($this->_customer)) {
$this->_customer = Mage::getModel('customer/customer');
$params = Mage::helper('core')->urlDecode($this->getRequest()->getParam('data'));
$data = explode(',', $params);
$cId = abs(intval($data[0]));
if ($cId && $cId == Mage::getSingleton('customer/session')->getCustomerId()) {
$this->_customer->load($cId);
}
}
return $this->_customer;
}
示例2: setUp
protected function setUp()
{
$customer = new Mage_Customer_Model_Customer();
$customer->load(1);
Mage::register('current_customer', $customer);
$layout = new Mage_Core_Model_Layout(array('area' => 'adminhtml'));
$this->_block = $layout->createBlock('Mage_Adminhtml_Block_Customer_Edit_Tab_View_Accordion');
}
示例3: getCustomer
/**
* Retrieve customer model object
*
* @return Mage_Customer_Model_Customer
*/
public function getCustomer()
{
if (is_null($this->_customer)) {
$this->_customer = Mage::getModel('customer/customer');
if ($customerId = $this->getCustomerId()) {
$this->_customer->load($customerId);
}
}
return $this->_customer;
}
示例4: getCustomer
/**
* Retrieve customer model object
* @param bool $forceReload
* @param bool $useSetStore
* @return Mage_Customer_Model_Customer
*/
public function getCustomer($forceReload = false, $useSetStore = false)
{
if (is_null($this->_customer) || $forceReload) {
$this->_customer = Mage::getModel('customer/customer');
if ($useSetStore && $this->getStore()->getId()) {
$this->_customer->setStore($this->getStore());
}
if ($customerId = $this->getCustomerId()) {
$this->_customer->load($customerId);
}
}
return $this->_customer;
}
示例5: getCustomer
/**
* Retrieve customer model object
*
* @return Mage_Customer_Model_Customer
*/
public function getCustomer()
{
if (is_null($this->_customer)) {
$this->_customer = Mage::getModel('Mage_Customer_Model_Customer');
if ($customerId = $this->getCustomerId()) {
$this->_customer->load($customerId);
if (!$this->_customer->getId()) {
$this->_customer->setCustomerId(null);
}
}
}
return $this->_customer;
}