cancel
Showing results for 
Search instead for 
Did you mean: 

$customer->save() not working in Magenot 1.9.4.0 whole website

$customer->save() not working in Magenot 1.9.4.0 whole website

$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.

6 REPLIES 6

Re: $customer->save() not working in Magenot 1.9.4.0 whole website

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.

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution"

Re: $customer->save() not working in Magenot 1.9.4.0 whole website

Hello @Ashish_k_php 

 

Did you check your PHP version compatibility?

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: $customer->save() not working in Magenot 1.9.4.0 whole website

Re: $customer->save() not working in Magenot 1.9.4.0 whole website

Yes we checked and apply but still not resolved the issue.

Re: $customer->save() not working in Magenot 1.9.4.0 whole website

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.


Re: $customer->save() not working in Magenot 1.9.4.0 whole website

@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.