我在查询字符串中有一个生日,例如:
?birthdate=1991-01-01
我的代码如下:
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
$customer->loadByEmail($email);
if (!$customer->getId()) {
$customer->setEmail($email);
$customer->setFirstname($name);
$customer->setLastname($lastname);
$customer->setPassword($password);
$customer->setGender(
Mage::getResourceModel('customer/customer')
->getAttribute('gender')
->getSource()
->getOptionId($gender)
);
}
就像我想要的一样:
$customer->setBirthday($date);
任何解决方案?