Send first order comment in email?

Deleted
From Unknown

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
From Sweden
Member since 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);

Deleted
From Unknown

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
From Sweden
Member since May 2013
tim

Remove var_dump. That's only for your debug.

Deleted
From Unknown

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

tim
Founder
From Sweden
Member since May 2013
tim

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

Deleted
From Unknown

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 :)

You
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.