Send first order comment in email?

Eliminado
De Desconocido

Hi tim

could you add a Variable for the FIRST comment? Eg. the comment thats made with the order first time.
I would love to include that in the supplier ordering mail on demand.

Or any hint?

Alex

tim
Founder
De Sweden
Miembro desde may. 2013
tim

You mean like this?

$first_comment = array_shift(array_values($order->data['comments']));
or
$first_comment = array_values($order->data['comments'])[0];

var_dump($first_comment);

Eliminado
De Desconocido

Not really working straigt forward...

$first_comment = var_dump(array_values($this->data['comments'])[0]);

$first_comment is empty-

Unsing it at supplier_order_forwarding.xml
$first_comment = var_dump(array_values($this->data['comments'])[0]);

'%customer_comments' => $first_comment,

tim
Founder
De Sweden
Miembro desde may. 2013
tim

Remove var_dump. That's only for your debug.

Eliminado
De Desconocido

Problem is that $this->data['comments'] is emtpy

tim
Founder
De Sweden
Miembro desde may. 2013
tim

So it's $order->data['comments'] outside the order object and $this->data['comments'] inside.

Eliminado
De Desconocido

Both objects dont contain any data inside supplier_order_forwarding.xml...

Anyway. For now im happy that everything with priority works, will investigate that a bit later :)

This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.