Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9193371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:08:47+00:00 2026-06-17T21:08:47+00:00

In order to develop an automated order status changer based on payment method and

  • 0

In order to develop an automated order status changer based on payment method and event type, I created the following module:

/GT/OrderFlo/etc/config.xml

    <!--?xml version="1.0"?-->
<config>
    <modules>
        <gt_orderflow>
            <version>1.0</version>
        </gt_orderflow>
    </modules>

    <global>

        <models>            
            <orderflow>
                <class>GT_OrderFlow_Model</class>
            </orderhook>
        </models>

        <events>
            <sales_order_place_after>
                <observers>
                    <order_payment_pending_autostatus>
                        <type>singleton</type>
                        <class>orderflow/observer</class>
                        <method>implementOrderStatus</method>
                    </order_payment_pending_autostatus>
                </observers>
            </sales_order_place_after>
            <sales_order_shipment_save_after>
                <observers>
                    <order_invoice_pending_autostatus>
                        <type>singleton</type>
                        <class>orderflow/observer</class>
                        <method>implementOrderStatus</method>
                    </order_invoice_pending_autostatus>
                </observers>
            </sales_order_shipment_save_after>
            <sales_order_invoice_save_commit_after>
                <observers>
                    <order_complete_autostatus>
                        <type>singleton</type>
                        <class>orderflow/observer</class>
                        <method>implementOrderStatus</method>
                    </order_complete_autostatus>
                </observers>
            </sales_order_invoice_save_commit_after>                        
        </events>

    </global>
</config>

/GT/OrderFlow/Model/Observer.php

class GT_OrderFlow_Model_Observer
{
public function implementOrderStatus($event)
{
    $order = $event->getOrder();
    $payment_method = $this->_getPaymentMethod($order);
    $this->_log('In implementOrderStatus with payment method: '.$payment_method);
    Mage::log('In implementOrderStatus with payment method: '.$payment_method);
    $next_status = "";
    return $this;
}

private function _getPaymentMethod($order)
{
    return $order->getPayment()->getMethodInstance()->getCode();
}

private function _log($message)
{
    return Mage::log($message, null, 'gt_orderflow.log');
}
}

The code was replicated from http://www.atwix.com/magento/auto-invoice-and-custom-order-status-upon-checkout/.

But how can I get it to fire the observer after sales_order_place_after event?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:08:49+00:00Added an answer on June 17, 2026 at 9:08 pm

    Is your module loaded at all? You will need a file in /app/etc/modules. On a related note, I see that you refer to your module as <gt_orderflow> but the class prefix is GT_OrderFlow. On a case sensitive filesystem, this is important and will not work this way. The nodes under config/modules are mapped to the module path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, I am trying to develop a customer order system. I wrote a method
I need to achieve the following, in order to avoid having to develop a
In order to more efficiantly develop Imaging based applicatitions it would really help if
In order to develop qt application on eclipse, i have installed mingw, qt and
In order to develop and debug mobile and tablet applications, I'd like to be
Yesterday I began to write C# in order to develop usercontrols for Umbraco and
i would like to work on a website in order to develop other fonctionalities.
Order by descending is not working on LINQ to Entity In the following Query
I need to develop a PHP class to communicate with Apple servers in order
I'm relatively new to gradle. In order to create an automated deployment script on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.