I have a problem with sending the Welcome Mail after confirmation. It is the translated standard welcome mail we have created in transactional emails (backend) and then configured on store view scope.

It´s always send in german (store_id=1) which is our default storeview. I have already debugged it and ran into code/core/Mage/Adminhtml/controllers/CustomerController.php l.351 where the welcome mail gets send and the getSendemailStoreId() seems to be the code where it always returns store_id=1, as it seems to be null first and then loading the default/first element of the store-id array that gets loaded somehow.

I tried to get the correct store_id based on customer, but it seems that getStore() and getData() on customer-object are not containing the correct ID and the only place where I could find the correct one was in $customer-> _data['store_id'] (not in "data" !), but i could not get it out there !

I hope someone can help me to fix this strange behaviour. Thank you !

this is where you can send the mail via backend after customer has registered ->within manage customers

this is the snippet from customer controller

  • will you please check store_id in store table in database. will see column store_id and website_id. Dec 8, 2017 at 13:56
  • @bharatdesai i checked the table, and the store id´s are different starting with "1" for german, "26" for english and so on.website id´s always "1" as we only have one website...
    – Jannis S.
    Dec 13, 2017 at 14:35

1 Answer 1


Here in your code in line 351 he is getting the websiteId and not a storeID, this config is available in : Admin->Customer->Manage Customer->Account Information->Associate to Website. if you want to get current Store id of a customer, you can use some code like this:

if (Mage::getSingleton('customer/session')->isLoggedIn()) {
    $customer = Mage::getSingleton('customer/session')->getCustomer();
    $customerInfo = Mage::getModel('customer/customer')->load($customer->getId())->getData();


[entity_id] => 1
[entity_type_id] => 1
[website_id] => 1
[group_id] => 1
[store_id] => 1
  • i tried to load customerinfo instead of l.352 (getSendemailStoreId()), but it did not work. The store_id was still not set correctly and this time it not even send any mail. I also don´t know if it is needed to check if customer is logged in, as they can´t be logged in until admin registered them and send the welcome mail (which is not being sent / sent in wrong language -> always german/ store_id="1")
    – Jannis S.
    Dec 13, 2017 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.