Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Error with On-Hold Orders
 
andreladocruz
Guru
 
Total Posts:  322
Joined:  2008-05-07
Brazil
 

On-Hold Orders not function well..

we have a payment module that sets all paid orders to on-hold.

before de 1.1.5 version we had to release the on-hold status, generate the invoice and the new status of order were Paid.

Anyone of this steps are functioning!

any urgent help???

Regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
andreladocruz
Guru
 
Total Posts:  322
Joined:  2008-05-07
Brazil
 

to change the order to Hold Status we are using the following code:

if ($NumPedido != ''
// post de mudança de status
 
$_order Mage::getModel('sales/order')->loadByIncrementId($NumPedido);
 
$_order->addStatusToHistory('holded',    Mage::helper('Boleto')->__(htmlentities("Pagamento do Boleto Confirmado.")),true);
 
$_order->save();
}

is it right?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael_1
Enthusiast
 
Total Posts:  826
Joined:  2007-08-31
 
andreladocruz - 16 September 2008 07:33 AM

to change the order to Hold Status we are using the following code:
....
is it right?

No, it’s not.

You can try the following sequence:

$_order->hold();
$_order->addStatusToHistory('holded', ...);
$_order->save();

Please let me know if it helps.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top