【发布时间】:2014-08-24 09:51:05
【问题描述】:
当结帐 onepagecontroller 在 indexAction 中时,我想禁止某些付款方式。我试过这样:
$payments = Mage::getSingleton('payment/config')->getAllMethods();
foreach($payments as $payment)
{
$methodinstance = Mage::helper('payment')->getMethodInstance($payment->getCode());
$methodinstance-> // here i want to set the protected $_canUseCheckout of the specific method class... maybe with __set(var, value) ?
}
那么有没有办法将每个方法的 canUseCheckout 临时设置为 false ?也许我不必使用变量..也许有一个功能? 我在 Model_Abstract 类的付款方式中没有找到这样的...
【问题讨论】: