Note that there are some explanatory texts on larger screens.

plurals
  1. POPrestaShop email localization
    primarykey
    data
    text
    <p>I am developing a module for PrestaShop 1.5.</p> <p>I am sending email like this(the documentation is really missing, i studied other default components and this is what i got so far)</p> <pre><code>Mail::Send( $this-&gt;context-&gt;language-&gt;id, //int $id_lang 'template_name',//string $template //Mail::l('Hello', $this-&gt;context-&gt;language-&gt;id),//string $subject $this-&gt;l('Email subject'),//string $subject array('{discount}' =&gt; $code, '{firstname}' =&gt; $customer['firstname'], '{lastname}' =&gt; $customer['lastname'], '{img_url}' =&gt; $img_url, '{valid_days}' =&gt; $form['days_valid'] ),//string $template_vars $customer['email'],//string $to implode(' ', array_filter( array( $customer['firstname'], $customer['lastname']) )), strval( Configuration::get('PS_SHOP_EMAIL') ),//string $from strval( Configuration::get('PS_SHOP_NAME') ),//string $from_name /* null,//string $from null//string $from_name */ null,//array $file_attachment null,//$mode_smtp $template_path//string $template_path /*__PS_BASE_URI__.'modules/'.$this-&gt;name.'/mails/' */ ); </code></pre> <p>Note i tried using </p> <pre><code>Mail::l('Hello', $this-&gt;context-&gt;language-&gt;id),//string $subject </code></pre> <p>and</p> <pre><code>$this-&gt;l('Email subject'),//string $subject </code></pre> <p>as the email's subject.</p> <p>And i keep getting "No Subject was found for ...". What the customer receive is the hardcoded string i put in the source code.</p> <p>So how to get rid of this error: <img src="https://i.stack.imgur.com/uCVRL.jpg" alt="enter image description here"> Plus the emails are sent in apparently random language(sometimes english, sometimes italian).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload