I went to Admin Panel > Sales > Payment Methods > Bank Transfer Payment > New Order Status
. I updated it to "pending" however when I place a new order the status still went to "processing".
I tried this. I went to code/core/Mage/Sales/Model/Order/Payment.php
:
protected function _authorize($isOnline, $amount)
{
// update totals
$amount = $this->_formatAmount($amount, true);
$this->setBaseAmountAuthorized($amount);
// do authorization
$order = $this->getOrder();
$state = Mage_Sales_Model_Order::STATE_PROCESSING;
$status = true;
I changed the STATE_PROCESSING
to STATE_NEW
to set it on "pending" but when I place a new order the status still went to "processing".
How can I change the new order status to pending for bank transfer?
My Magento version is 1.9.0.1
Here's the screenshot:
Best Answer
Using a custom Magento module can do this task. Let’s name it Atwix_Orderhook.
Step 1 : First,Create a module initializer in /app/etc/modules/Atwix_Orderhook.xml with the following content:
Step 2: Create a module configuration file
config.xml
in/app/code/community/NAMESPACE/MODULENAME/etc/
(replace NAMESPACE and MODULENAME with your own values). In our case the path will be/app/code/community/Atwix/Orderhook/etc/
.config.xml
content:Step 3 Create observer file
app/code/community/Atwix/Orderhook/Model/Observer.php
with the following content:Save this module and clear your cache. For more see here.