[ixpmanager] Issue with billing details notification

Rasmus Åberg rasmus at sthix.net
Mon Aug 21 11:39:55 IST 2017


Hello!

 

When a customer updated their billing info I didn’t receive any e-mails... Tracked this down to the following:

 

"billing" => array:1 [▼

    "updates_notify" => "support at sthix.net"

  ]

 

And the config/ixp_tools.php config file states:

    'billing_updates_notify' => "support at sthix.net",

 

When looking in the code it refers to...

·         $this->_options['billing_updates']

...and...

·         $this->_options['billing_updates']['notify']

 

So, after replacing “billing_updates” with “billing” and “notify” with “updates_notify” in the code I got it working.

 

See diff:

 

--- application/controllers/DashboardController.php                2017-08-21 12:36:40.958423089 +0200

+++ /tmp/DashboardController.php              2017-08-21 12:36:14.727856878 +0200

@@ -137,14 +137,14 @@

         {

             if( $form->isValid( $_POST ) )

             {

-                if( isset( $this->_options['billing'] ) && $this->_options['billing']['updates_notify'] )

+                if( isset( $this->_options['billing_updates'] ) && $this->_options['billing_updates']['notify'] )

                     $old = clone $this->getCustomer()->getBillingDetails();

 

                 $form->assignFormToEntity( $this->getCustomer()->getBillingDetails(), $this, true );

                 $this->getD2EM()->flush();

                 $this->addMessage( 'Your billing details have been updated', OSS_Message::SUCCESS );

 

-                if( isset( $this->_options['billing']['updates_notify'] )  )

+                if( isset( $this->_options['billing_updates']['notify'] )  )

                 {

                     $this->view->oldDetails = $old;

                     $this->view->customer = $this->getCustomer();

@@ -152,7 +152,7 @@

                     $this->getMailer()

                         ->setFrom( $this->_options['identity']['email'], $this->_options['identity']['name'] )

                         ->setSubject( $this->_options['identity']['sitename'] . ' - ' . _( 'Billing Details Change Notification' ) )

-                        ->addTo( $this->_options['billing']['updates_notify'] , $this->_options['identity']['sitename'] .' - Accounts' )

+                        ->addTo( $this->_options['billing_updates']['notify'] , $this->_options['identity']['sitename'] .' - Accounts' )

                         ->setBodyHtml( $this->view->render( 'customer/email/billing-details-changed.phtml' ) )

                         ->send();

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.inex.ie/pipermail/ixpmanager/attachments/20170821/dc4685e4/attachment.html>


More information about the ixpmanager mailing list