How can I edit email templates?

And where?
I can not find it in admin.

tim

Are you refering to the order copy?

Yes first email - after order.

I want to add to content:

  • Terms & Conditions
    and
  • Right to Revocation.
tim

templates/*/views/printable_order_copy.inc.php

Yes I found it.

But I have problem with another languages.

Can I add - Terms & Conditions and Right to Revocation, as pdf - for each language separately?

Or maybe as:

echo language::translate('title_xxxx', 'xxxx');

But here text will be not formatted?

tim

To format the text you need to enable HTML when editing the translation. See the little checkbox when editing.

If you want to attach a PDF to the email you would have to tweak email_order_copy() in controllers/ctrl_order.inc.php. See functions/func_email.inc.php which parameter is used for file attachments.

I see it :D

How can I add own translations code?
Direct in file?

tim

Just enter whatever code you desire. Once the code is executed it will be in the database.

language::translate('mycode', 'My text...');

I thougt so.
First I must add 2 changes to database.

  1. Terms & Conditions
  2. Right to Revocation

And then
language::translate ( 'terms.......' , 'text.....')

tim
  1. Just add the translation placeholders to your view/document:
language::translate('mycode', '');
  1. Access the page so it will display once (translations will be generated).

  2. Go to Admin -> Translations -> and edit your translations.

functions/func_email.inc.php this file no have help me plice

tim

@flymbox, no you revived a thread that is 7½ years old. 👎

LiteCart 2.x uses a component named ent_email:
https://github.com/litecart/litecart/blob/2.5.4/public_html/includes/entities/ent_email.inc.php

See how it is used here.
https://github.com/litecart/litecart/blob/2.5.4/public_html/includes/entities/ent_order.inc.php#L779-L782

If you want to pass HTML, pass a second parameter true to the function add_body() like this: ->add_body($myhtmlmessage, true).

This thread has been closed due to long inactivity. Posting to it is not possible.
View code on GitHub