Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Basically, what you need is (surprise) an observer module to do exactly that. Also, it is quite the same work <a href="https://stackoverflow.com/questions/1365930/how-to-trigger-an-event-on-payment-received-in-magento">in one of the links you provided</a>.</p> <p>To make a barebones observer module, you only need three files:</p> <p>/app/etc/modules/Electricjesus_Notifyowner.xml</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;config&gt; &lt;modules&gt; &lt;Electricjesus_Notifyowner&gt; &lt;active&gt;true&lt;/active&gt; &lt;codePool&gt;local&lt;/codePool&gt; &lt;/Electricjesus_Notifyowner &gt; &lt;/modules&gt; &lt;/config&gt; </code></pre> <p>/app/code/local/Electricjesus/Notifyowner/etc/config.xml</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;config&gt; &lt;modules&gt; &lt;Electricjesus_Notifyowner&gt; &lt;version&gt;0.1.0&lt;/version&gt; &lt;/Electricjesus_Notifyowner&gt; &lt;/modules&gt; &lt;global&gt; &lt;models&gt; &lt;notifyowner&gt; &lt;class&gt;Electricjesus_Notifyowner_Model&lt;/class&gt; &lt;/notifyowner&gt; &lt;/models&gt; &lt;events&gt; &lt;sales_order_payment_pay&gt; &lt;observers&gt; &lt;notifyOwnerEvent&gt; &lt;class&gt;notifyowner/observer&lt;/class&gt; &lt;method&gt;notifyOwnerEvent&lt;/method&gt; &lt;/notifyOwnerEvent&gt; &lt;/observers&gt; &lt;/sales_order_payment_pay &gt; &lt;/events&gt; &lt;/global&gt; &lt;/config&gt; </code></pre> <p>/app/code/local/Electricjesus/Notifyowner/Model/Observer.php</p> <pre><code>&lt;?php class Electricjesus_Notifyowner_Model_Observer { public function notifyOwnerEvent($observer) { // parameters you can get from the $observer parameter: // array(’payment’ ? $this, ‘invoice’ ? $invoice) $payment = $observer-&gt;getPayment(); $invoice = $observer-&gt;getInvoice(); // derivative data $order = $invoice-&gt;getOrder(); // Mage_Sales_Model_Order $ownerEmail = 'owner@shop.com'; /* - build data - build email structure - send email via any php mailer method you want */ return $this; // always return $this. } } </code></pre> <p>You can also use other events in place of <code>sales_order_payment_pay</code> (see config.xml). See <a href="http://www.magentocommerce.com/wiki/5_-_modules_and_development/reference/magento_events" rel="nofollow noreferrer">this list</a> for a semi-complete list of events along with their parameters. And on <a href="http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/customizing_magento_using_event-observer_method#list_of_events" rel="nofollow noreferrer">this document</a> to is some techniques to check/get an update of the current list of events with their parameters.</p> <p>I recommend using Zend_Mail to do your mail stuff inside the observer. Nothing special, I'm just biased towards Zend stuff.</p> <p><a href="http://framework.zend.com/manual/en/zend.mail.html" rel="nofollow noreferrer">http://framework.zend.com/manual/en/zend.mail.html</a></p> <p>--- EDIT</p> <p>if you want a ready-made extension to do this (and more) and if you do not mind paying for it, you can take a look at:</p> <p><a href="http://www.magentocommerce.com/magento-connect/admin-email-notifications.html" rel="nofollow noreferrer">http://www.magentocommerce.com/magento-connect/admin-email-notifications.html</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload