1

I wanted to know if it is possible to convert all the sending transactional mails into the text format like Amazon/StickerMule does? Basically something without text formatting and just plain text so as to improve the sending time and decrease the size of the email. It gives all the information that is required and also is easily downloadable without eating up any data.

I was assuming this is a good option, isn't it?

Some examples: enter image description here enter image description here

I would be really glad if someone could assist me with that.

4
  • Can you be more clear on "like Amazon does"? Perhaps an example in your question? Do you mean plain text formatting? Sep 15, 2015 at 18:11
  • Yes, some examples please.
    – benmarks
    Sep 16, 2015 at 2:07
  • @SanderMangel , Please have a look at the edited post above. Sorted it out. Sep 16, 2015 at 7:40
  • What have you tried so far. did you take a look at the email templates in app/locale/[]language]/template/email/.... Here you can find all emails and change them to whatever you want Sep 16, 2015 at 8:00

1 Answer 1

0

The e-mail templates content is generated from the files located in app/locale/{lang}_ISO/template/email, but the templates can be overwritten from system->transactional emails.
you need to override these templates and remove the markup.
Also, the data related to ordered items/invoice items/shipping items come from app/design/frontend/base/default/template/email. You need to copy all those files to your theme and remove the markup.

The setting that determines if a mail is sent as text or html can be found in the config.xml file for each email. here is an example for sales.
You will need to create a custom module and in the config.xml of that custom module you need to list all e-mail tempaltes code and change the type tag to text.
Here is an example

<?xml version="1.0"?>
<config>
    <modules>
        <[Namespace]_[Module]>
            <version>1.0.0</version>
        </[Namespace]_[Module]>
    </modules>
    <global>
        <template>
            <email>
                <sales_email_order_template>
                    <type>text</type>
                </sales_email_order_template>
                <sales_email_order_guest_template>
                    <type>text</type>
                </sales_email_order_guest_template>
                .....
            </email>
        </template>
    </global>
</config>

If you don't want to add all these templates in your config.xml you can copy the file app/code/core/Mage/Core/Model/Template.php to the local folder and change the method

public function isPlain()
{
    return $this->getType() == self::TYPE_TEXT;
}

to

public function isPlain()
{
    return true;
}

This will make all the e-mails considered as text.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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