Magento News
Return from Paypal causes order cancellation
by nigelt (Posted Sun, 13 Feb 2011 11:14:32 GMT)
Hmm.. I replied to this ages ago but god knows where the post has gone !
Here it is again for paypal….
The file that need altering is…..
/app/code/core/Mage/Paypal/controllers/StandardController.php
Replace the following code.
Its a workaround. It returns to magento, and keeps the cart active, but no information on whats happened !
public function cancelAction()
{
$session = Mage::getSingleton(‘checkout/session’);
$session->setQuoteId($session->getPaypalStandardQuoteId(true));
// Diglin – Allow to the user to get back his cart
Mage::getModel(‘sales/quote’)->load($session->getQuoteId())->setIsActive(true)->save();
if ($session->getLastRealOrderId()) {
$order = Mage::getModel(‘sales/order’)->loadByIncrementId($session->getLastRealOrderId());
if ($order->getId()) {
$order->cancel()->save();
}
}
$this->_redirect(‘checkout/cart’);
I think diglin was the originator of this code, so thankyou diglin.
I’ve used this in 1.4.2 and its fine, havent tried on 1.5.0 yet though.
Nige
http://magento-forum.co.uk/viewtopic.php?f=3&t=619#p2303
Possibly Related Posts:
- Hiring #Magento #Developers at #Ahmedabad location. http://t.co/O5PmfSqi #Magento #PHP #Mysql #Jobs #Ahmedabad
- わかってるよ………… あんたの「鉄球」はツェペリの一族のより上の技術があるんだろ? 安心してるよ
- Magento Upgrade by blugreen http://t.co/ZyH6G2MO #jobs #Freelance
- Looking for #Zend #Developers at #Ahmedabad location. http://t.co/O5PmfSqi #Magento #PHP #Mysql #Jobs #Ahmedabad
- Looking for #Zend #Developers at #Ahmedabad location. http://t.co/xDkodbp4 #Magento #PHP #Mysql #Jobs #Ahmedabad
RSS Feed