Both the customer_entity
as well as the customer_address_entity
table have their own updated_at
column.
This means those two values will be updated independent from each other.
The easiest is probably to trigger an update of the customer entity data.
Create a new module and add an observer on the customer_address_save_after
event:
<config>
<modules>
<YourName_Customer>
<version>0.0.1</version>
</YourName_Customer>
</modules>
<models>
<yourname_customer>
<class>YourName_Customer_Model</class>
</yourname_customer>
</models>
<events>
<customer_address_save_after>
<observers>
<customer_address_save_after_update_customer>
<class>yourname_customer/observer</class>
<method>afterAddressSave</method>
</customer_address_save_after_update_customer>
</observers>
</customer_address_save_after>
</events>
</global>
</config>
Then create YourName/Customer/Model/Observer.php
and add the afterAddressSave
function:
class YourName_Customer_Model_Observer {
/**
* Save customer after customer address update
*
* @param Varien_Event_Observer $observer
*/
public function afterAddressSave($observer) {
/** @var $customerAddress Mage_Customer_Model_Address */
$customerAddress = $observer->getCustomerAddress();
$customer = $customerAddress->getCustomer();
$customer->setHasDataChanges(true);
$customer->save();
}
}
If the update of the customer data does not work, you might consider adding $customer->setSomeNonExistentProperty(true);
to the observer function.
Note: The code above is not tested. It might needs some improvement to get it running.