我有問題關於magento鉤"customer_address_save_after"
& "address_save_after"
。我想從這個鉤子請求API,從Magento數據庫獲取用戶。不幸的是,在這個時候,在數據庫中是舊數據 - 尚未更新。Magento地址保存後鉤子和數據庫更新
Magento中有沒有掛鉤,它允許我在數據庫更新後發出請求?或者可能是任何方法來將數據保存到數據庫中?像$ customer-> save()?
public function afterAddressSave($observer)
{
$customerAddress = $observer->getCustomerAddress();
$customer = $customerAddress->getCustomer();
if ($customer->getDefaultBillingAddress() && $customer->getDefaultBillingAddress()->getCountryId()) {
Mage::helper('iwsettings')->setStoreId($customer, $customer->getDefaultBillingAddress()->getCountryId());
}
$this->updateTypo3UserData($customer);
}