$customer->save()
Not working for the whole website.
When we save customer-related any data or any form submit time not working.
Please share any idea about the same.
Hello @Ashish_k_php
Please try the below solution:
$websiteId = Mage::app()->getWebsite()->getId(); $store = Mage::app()->getStore(); $customerId = 12; $customer = Mage::getModel("customer/customer")->load($customerId); $customer->setWebsiteId($websiteId) ->setStore($store) ->setFirstname('John') ->setLastname('Doe') try{ $customer->save(); } catch (Exception $e) { Mage::log($e->getMessage()); }
Hope it helps.
Hello @Ashish_k_php
Did you check your PHP version compatibility?
Yes we checked and apply but still not resolved the issue.
Yes, that works fine we checked.
Most of the customer method has $customer->save() to save that customer information.
So, problem into the $customer-save().
We checked all the custom customer attribute all are get properly before this method but $customer->save() not working,
Even no XML file issue, no error log, not any system and error report.
@Meetanshi thanks for the reply.
This code for the new customer, but we need to save customer information edit time.
Save information of the customer which already exist in the admin side and register in past.