View Single Post
  #28  
Old 11-03-2014, 05:48 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Invoice notification

So I believe I've narrowed it down to the right section of code as you suggested, but once again this is nothing like XC4. So I've hit that wall. I don't understand where I need to insert the new bit of code, perhaps after the first "$mail->send();" I need to build out the text notification? But again I have no idea how to call the 3 fields I'm looking for. I think it's go something to do with array()?

This is the Order.php I made thus far.
PHP Code:
<?php

namespace XLite\Module\FasterThanYours\InvoiceTextNotification\Model;

class 
Order extends \XLite\Model\Base\SurchargeOwner
{
    protected function 
sendProcessMail()
    {
        
$mail = new \XLite\View\Mailer();
        
$mail->order $this;
        
$mail->adminMail true;
        
$mail->compose(
            \
XLite\Core\Config::getInstance()->Company->site_administrator,
            \
XLite\Core\Config::getInstance()->Company->orders_department,
            
'order_processed',
            array(),
            
true,
            \
XLite::CUSTOMER_INTERFACE,
            static::
getMailer()->getLanguageCode(\XLite::ADMIN_INTERFACE)
        );
        
$mail->send();

        
$mail->adminMail false;
        
$mail->selectCustomerLayout();
        
$profile $this->getProfile();
        if (
$profile) {
            
$mail->compose(
                \
XLite\Core\Config::getInstance()->Company->orders_department,
                
$profile->getLogin(),
                
'order_processed',
                array(),
                
true,
                \
XLite::CUSTOMER_INTERFACE,
                static::
getMailer()->getLanguageCode(\XLite::CUSTOMER_INTERFACE$profile->getLanguage())
            );
            
$mail->send();
        }
    }
}

I'm just guessing here, but does the code need to be added like this after the first $mail->send(); ?

PHP Code:
$mail = new \XLite\View\Mailer();
        
$mail->order $this;
        
$mail->adminMail true;
        
$mail->compose(5551234567@vtext.com,
array(
$Name,$SKU,$Price),
            
true,
            \
XLite::CUSTOMER_INTERFACE,
            static::
getMailer()->getLanguageCode(\XLite::ADMIN_INTERFACE)
        );
        
$mail->send(); 
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote