For some reason my checkout module save customer comment under ['additional_information']['checkoutmodule'][0]['value']

At invoice PDF I'm able to add this with below code:

    /* Add customer comment */
    $orderData = $order->getPayment()->getData();
    $orderComment = $orderData['additional_information']['checkoutmodule'][0]['value'];
        $page->drawText('Customer comment:', 35, $this->y-45, 'UTF-8');
        $page->drawText($orderComment, 35, $this->y-55, 'UTF-8');

However I need to access this information using SOAP as well. However, I can not find this value anywhere. Any idea how I could access it?

Also, is this place the actual place where customer_comment should be saved?

  • Magento doesn't have a customer comment. Most of the time I misuse gift message – Fabian Blechschmidt Jun 11 '15 at 14:27
  • Ok, that explains. I would prefer having it there as well. I found this code in: app\code\community\Made\checkoutmodule\Model\Sales\Observer.php $observer->getEvent() ->getPayment() ->setAdditionalInformation('checkoutmodule', $custom) So my guess is that I need to stick with their solution as this is considered to be a custom field. However. I need to come up with a way to get it using Soap. – Andreas Jun 12 '15 at 8:08

Was able to solve it. It was easier then I thought. I was looking for it in sales_order.info_list however I needed to check the actual order and the Payment part.

Anyhow, here's the code:

  $shipdata = $proxy->call($sessionId, 'sales_order.info', $list['increment_id']);
  echo $orderComment = $shipdata['payment']['additional_information']['checkoutmodule'][0]['value'];
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.