|
So here’s the situation I found myself in:
I accept two forms of payment, credit card (through PayPal Pro - customer enters credit card directly on my site), and check/money order.
Customer ordered 3 items, and e-mails us stating that he wants to cancel one of the items. So I go into his order, and edit it. It states it will cancel the previous order, and create a new one. The problem now is that the customer never gave me his CC number, it was done through PayPal technically. In PayPal it’s still pending capture, so of course it’s simple enough for me to only capture the correct amount. The problem is in the new order it asks for payment...I can only enter a credit card # or choose check/money order.
In this situation I had to just choose check/money order. If I had been able to actually edit the original order, this would have fixed the issue. Not sure what I would have been able to do if I didn’t have check/money order in as a payment option.
Any suggestions on the best way to handle a situation like this, or possibly an improvement to Magento?
EDIT: THIS HAS BEEN SOLVED, THANK YOU TRELAYNE AND MEDLINGTON (Tested on v 1.3.2.1)
You can update this file: /app/code/core/Mage/Payment/Model/Method/Free.php
Or alternatively I recommend creating the directories and adding the Free.php file here so that it doesn’t get upgraded accidentally on a future update:
/app/code/local/Mage/Payment/Model/Method/Free.php
class Mage_Payment_Model_Method_Free extends Mage_Payment_Model_Method_Abstract { protected $_code = 'free';
public function isAvailable($quote=null) { if (is_null($quote)) { return false; }
if (Mage::app()->getStore()->roundPrice($quote->getGrandTotal()) == 0) { return true; } // Trelayne: get rid of this garbage //return false; // Trelayne: start change if (preg_match("|^/admin/admin/sales_order_create/|", $_SERVER['REQUEST_URI'])) { return true; } else { return false; } // Trelayne: end change } }
UPDATE 8/9/2010 - MAGENTO VERSION 1.4.1.1
The code Trelayne provided no longer seems to work for me on 1.4.1.1, but beavis82 was kind enough to post a zip file that creates a new payment method which works great. You can see the post in this thread here:
http://www.magentocommerce.com/boards/viewreply/208141/
I personally tested in Magento Version 1.4.1.1 and it worked great. Hopefully we can get beavis82 to make it an official extension and ensure it continues to work going forward.
|