i am using this following code to restrict the "cash on delivery" payment method based on pin code.
/app/code/core/Mage/Payment/Model/Method/Cashondelivery.php
Please check code here
now if cash on delivery payment method is not visible means i want to display "cod is not available" under
payment method.
please help me to find solution.
Best Answer
You referral link can only remove the code from payment list at check payment step.If you set error message at session
(Mage::getSingleton('core/session')->addError(Mage::helper('payment')->__('Code is not avaliable.')))
on functionisAvaliable
it can be shown on next step.According my concept it will be
good idea to do something at methods.phtml where all payment method has been listing
during the checkout.