- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
$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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: $customer->save() not working in Magenot 1.9.4.0 whole website
Hello @Ashish_k_php
Did you check your PHP version compatibility?
200+ Premium Magento 2 Extensions Need help? Hire Magento Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: $customer->save() not working in Magenot 1.9.4.0 whole website
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: $customer->save() not working in Magenot 1.9.4.0 whole website
Yes we checked and apply but still not resolved the issue.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.