Closed kamzata closed 6 years ago
Mage_Payment_Model_Method_Abstract has two hooks to change the "availability" of the payment option:
Mage_Payment_Model_Method_Abstract::isAvailable and Mage_Payment_Model_Method_Abstract::isApplicableToQuote
If you check for $quote->isVirtual() you should be able to hide the payment option.
Let us know if this works, would appreciate a pull request as this definitely makes sense.
Thank you but reinstalling extension has solved the issue.
Due to new problems I solved by editing the file Model/CashOnDelivery.php and adding:
.....
public function isAvailable($quote = null)
{
if($quote->isVirtual()) {
return false;
}
if (!parent::isAvailable($quote)) {
return false;
}
if (!is_null($quote)) {
......
and now it seems not miss a beat.
I noticed that sometimes (I can understand why) Cod option is shown buying downloadable products.
How can I remove the option?
(Cache management was disable)