我需要启用支票/汇票支付方式,以使我们的客户呼叫中心团队能够在管理员中创建订单.
但是,我们不希望客户通过网站在线购买使用此付款方式.
有谁知道我怎么能这样做?
此致,菲奥娜
Enr*_*que 14
两种选择:
1)
覆盖(使用从不更改原始文件或添加/ local/Mage/override)付款方式(或者只是修改它,如果它是您自己的方法),并添加以下内容:
protected $_canUseInternal = true;
protected $_canUseCheckout = false;
protected $_canUseForMultishipping = false;
Run Code Online (Sandbox Code Playgroud)
2)
在前端创建"payment_method_is_active"事件的观察者,并设置为不想要在前端显示的方法:
<config>
<frontend>
<events>
<payment_method_is_active>
<observers>
... your observer here
public function your_observer($event){
$method = $event->getMethodInstance();
$result = $event->getResult();
if( $method should not be active in frontend ){
$result->isAvailable = false;
}
}
Run Code Online (Sandbox Code Playgroud)