Deleted From Unknown Nov 17 2020 03:29 AM 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 Nov 18 2020 07:41 PM 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 Nov 19 2020 10:52 AM 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 Nov 19 2020 02:57 PM Remove var_dump. That's only for your debug.
tim Founder From Sweden Member since May 2013 tim Nov 19 2020 06:07 PM So it's $order->data['comments'] outside the order object and $this->data['comments'] inside.
Deleted From Unknown Nov 20 2020 10:46 AM 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 :)