Jump to content

theisurgeon

New Members
  • Posts

    1
  • Joined

  • Last visited

theisurgeon's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. My shipping software .php file pulls notes in from Magento. Problem is, after a certain number of "note" characters, the invoice does not print properly on my thermal printer (not sure the character limit, so I will need to use trial-by-error. I am assuming there should be an easy string limiter code to cut the excess characters and possibly append an ellipsis? Please help! writeStartTag("Notes"); // check for order-level gift messages if ($order->getGiftMessageId()) { $message = Mage::helper('giftmessage/message')->getGiftMessage($order->getGiftMessageId()); $messageString = "Gift message for ". $message['recipient']. ": ". $message['message']; if (trim($message['recipient']) != '') { writeFullElement("Note", $messageString, array("public" => "true")); } } $orderComments = $order->getAllStatusHistory(); foreach ($orderComments as $comment) { $body = $comment->getData('comment'); if ($body != '' && strpos($body, 'Order imported from') === false) { writeFullElement("Note", "*** Buyer message: $body", array("public" => "true")); } } writeCloseTag("Notes");
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.