<commit_before><?php
/**
 * Hackathon_ChatConnector extension
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the MIT License
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/mit-license.php
 *
 * @category       Hackathon
 * @package        Hackathon_ChatConnector
 * @copyright      Copyright (c) 2015
 * @license        http://opensource.org/licenses/mit-license.php MIT License
 */
/**
 * Invoice event cron
 *
 * @category    Hackathon
 * @package     Hackathon_ChatConnector
 * @author      <NAME> <<EMAIL>>
 */
class Hackathon_ChatConnector_Model_Events_Transactional_Invoice
    extends Hackathon_ChatConnector_Model_Events_Abstract
{
    /**
     * listener
     *
     * @access public
     * @param Varien_Event_Observer $observer
     * @return Void
     */
    public function listener($observer)
    {
        $order = $observer->getEvent()->getOrder();
        $shippingObj = $order->getShippingAddress();

        $messageTemplate = "New Invoice
        Shipping to
        {$shippingObj->getFirstname()} {{$shippingObj->getLastname()}}
        {$shippingObj->getStreet()}}
        {$shippingObj->getPostcode()}} {$shippingObj->getCity()}} ({$shippingObj->getPostcode()}} {$shippingObj->getCountryId()}})

        Items
        ";

        foreach ($shippingObj->getAllVisibleItems() as $_item) {
            $messageTemplate .= "{$_item->getQtyOrdered()}x {$_item->getName()} ({$_item->getSku()})\n";
        }

        $this->_addQueueItem($messageTemplate);
    }
}<commit_msg>[BUGFIX] changed included items invoice event<commit_after><?php
/**
 * Hackathon_ChatConnector extension
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the MIT License
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/mit-license.php
 *
 * @category       Hackathon
 * @package        Hackathon_ChatConnector
 * @copyright      Copyright (c) 2015
 * @license        http://opensource.org/licenses/mit-license.php MIT License
 */
/**
 * Invoice event cron
 *
 * @category    Hackathon
 * @package     Hackathon_ChatConnector
 * @author      <NAME> <<EMAIL>>
 */
class Hackathon_ChatConnector_Model_Events_Transactional_Invoice
    extends Hackathon_ChatConnector_Model_Events_Abstract
{
    /**
     * listener
     *
     * @access public
     * @param Varien_Event_Observer $observer
     * @return Void
     */
    public function listener($observer)
    {
        $order = $observer->getEvent()->getOrder();
        $shippingObj = $order->getShippingAddress();

        $messageTemplate = "New Invoice
        Shipping to
        {$shippingObj->getFirstname()} {{$shippingObj->getLastname()}}
        {$shippingObj->getStreet()}}
        {$shippingObj->getPostcode()}} {$shippingObj->getCity()}} ({$shippingObj->getPostcode()}} {$shippingObj->getCountryId()}})

        Items
        ";

        foreach ($order->getAllVisibleItems() as $_item) {
            $qty = (int)$_item->getQtyOrdered();
            $messageTemplate .= "{$qty}x {$_item->getName()} ({$_item->getSku()})\n";
        }

        $this->_addQueueItem($messageTemplate);
    }
}
{'fraction_non_alphanumeric': 0.13592233009708737, 'fraction_numerical': 0.0024271844660194173, 'mean_word_length': 3.035495716034272, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2773952', 'n_tokens_mistral': 987, 'n_tokens_neox': 959, 'n_words': 205}