How do you go about changing the title of emails in a second language store view. Example "New Order" in the New Order confirmation email. csv files are not responding in this case...
Another solution. You can copy the default email templates into a language folder you are wanting to use, and translate them manually.
Copy everything in app/locale/en_US/template to app/locale/[YOUR
LANGUAGE CODE]/template.
Change [YOUR LANGUAGE CODE] to the Language Code of your
desired language. YOu can find a list here. Make sure it's in
the format en_US.
Modify the email templates in your app/locale/[YOUR
LANGUAGE CODE]/template folder.
In Magento, go to System > Configuration > General. At the top left, change your Current Configuration Scope: to the store you want translated.
Change the Locale to the language you translated to. It must match correct the language code used in your folder namespace.
NOTE: When editing the email template files, you'll notice some comments at the top containing variables and such. You will see something like <!--#subject Welcome, {{var customer.name}}! #-->. Changing this will alter the subject line used by Magento.
You can just create custom Transactional Emails which include the translations needed for the store view.
Create a new Transaction Email template, in your store's required
language. Go to System > Transactional Emails and click Add New
Template. Load in the default template you are trying to
translate and modify the subject and body of the email.
Go to System > Configuration > Sales Emails At the top left of your configuration, change to your desired Store View you want these emails to be assigned to.
Change the New Order Confirmation Template to the Transaction Email template you created. Click Save Config.
Items ordered from that store should now send an email using the translated email you created.
Related
I want to have different transactional emails content depending of language. Is it possible to achieve that programatically, to create language specific content.
My website has ~50 store views/6 languages and I don't want to add separate template for every store.
UPDATE:
I don't want to translate, but to add completely different content for different languages. Random example: for all stores that use English language i want to have content "Welcome to our store", for stores that use French language i want to have content "How are you today(in French)" and so on. 95% of email content is completely the same, so i use translations for it, but the point is that i don't know how to 'fix' this 'different content' part
Use the trans directive in email templates. Make sure no spaces for variable assigment. Example:
<!-- Correct -->
{{trans "Thank you for your order from %store_name." store_name=$store.getFrontendName()}}
<!-- Incorrect -->
{{trans "Thank you for your order from %store_name." store_name = $store.getFrontendName()}}
The trans directive translate strings into the configured language for your store view. For example, if an email is being sent from a store view that is configured to use the fr_FR locale, the emails are translated to French.
Should have proper configs in the following paths:
Stores-->Configuration-->General-->General-->Locale Options
path_to_theme_directory/i18n/fr_FR.csv
Please check details on Magento's devdocs
How can I change what appears in the password reset email in laravel?
Like addressing the user with his name and show the password reset link etc.
Where is that email view located?
In Laravel 5.3 they changed the entire password reset code, so the given answer doesn't work anymore.
If you want to change the basic texts you should copy vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php to some place in your own app (e.g. app/Notifications/ResetPassword.php), set the correct namespace and alter the texts as you wish. (don't alter the original ResetPassword.php since it's bad practice to alter files in the vendor folder!)
Then add a sendPasswordResetNotification method to the User class and make sure to reference to the appropriate ResetPassword class:
use App\Notifications\ResetPassword;
...
public function sendPasswordResetNotification($token) {
$this->notify(new ResetPassword($token));
}
If you want to change the rest of the mail template (which is used for all other mails as well) do the following:
Run php artisan vendor:publish
This will copy some blades from the vendor folder to the resources/views/vendor
The resources/views/vendor/notifications/email.blade.php is the one you want to change.
Hope this helps for people who got stuck in Laravel 5.3
Yes you can change the email template, which is located at
resources/views/emails/password.blade.php.
For customization pass an instance of User model to this view and echo out user name there like:
Hello, {{$user->username}}
//And Body of Reset link goes here
Update for laravel 5.3+
In updated laravel versions the code structure is revamped.
Password reset mail is now at vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php
and its corresponding template is at:
resources/views/vendor/notifications/email.blade.php
So in order to customize it, you may need to:
Copy it to somewhere in your app's directory.
Set the proper namespace to refer to it.
Add a new method to User class & reference it to newly copied class
Customize.
Is it possible to create custom action button? ["Junk" button with more complex action]
I would like to:
mark the message as junk
copy the message to special folder common to all email accounts
move the message to per account junk folder
AFAIK Current junk button can deliver 1 and 3 without 2.
I need it for custom reporting to external services e.g. spamcop, knujon and other.
If thunderbird can not deliver such functionality then I am willing to accept suggestion of other Linux email clients capable to deliver such functionality.
Obviously this is easy to do with a custom XUL add-on and some basic Thunderbird chrome scripting.
This can also be done with the Custom Buttons Add-on for Thunderbird. Here is the code for the button, you will need to replace with your own folder URI's. The URI's for the folders can be accessed from the right-click content menu Properties .
/* Code */
// 1. mark the message as junk
goDoCommand("cmd_markAsJunk");
// 2. copy the message to special folder common to all email accounts
var copyUri = "imap://{user}#{host}/{path}/{folder}";
var copyFolder = GetMsgFolderFromUri(copyUri);
MsgCopyMessage(copyFolder);
// 3. move the message to per account junk folder
var moveUri = "mailbox://{user}#Local%20Folders/{spam folder}";
var moveFolder = GetMsgFolderFromUri(moveUri);
MsgMoveMessage(moveFolder);
The button script definitions are stored in the file:
{thunderbird profile}/custombuttons/buttonsoverlay.xul
You may be able to update this file automatically to ease deployment.
WARNING: Thunderbird 31 requires different code.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1043819
I need to find out where are all emails templates (newsletter, registration confirmation, etc..) to customize AND and translate them.
Where can I find an exhaustive list?
You can get a pretty good list from System > Transactional Emails > Add New Template > Load default template.
Also just about all emails start out in the folder app/locale/en_US/template/email/
I'm using Drupal 6.16: When a user creates an account on my site I have them select a category (ie children, youth, adult, etc). This is done with the select list box using the content_profile module. I have a content type that posts an announcement. In this content type is a check box that says 'email group'. Right now it does nothing, but what I would like for it to do is e-mail all the users that are associated with the group they chose when signing up for their account. If this will require extra code please be specific as I am not a strong php programmer.
Thanks for the help!!
msindle
There might be some module that do it exactly, but I don't think so.
I would have done it using few building blocks:
Retrieve the list of emails using Views - define a view that gives you the addresses according to a given group argument.
Use Rules module that will send an email notification after node is created.
Combine the two (this is the hard part) - insert the values from the view as the recipients for the email. You might be able to do it using PHP inside the Rule definition, plus view execution.
Try to accomplish it, and if you get into troubles, you are welcome to contact me via shushu.i#gmail.com
I would try http://drupal.org/project/subscriptions module + http://drupal.org/project/messaging module. You can set preferences for automatic subscribing to content type. Maybe Rules module can subscribe users automatically after creating or updating content_profile. Or maybe Rules can flag users after creating or updating content_profile and Subscription module could autosubscribe flagged users.