在后台magento中隐藏和跳过发货、付款方式
我想 隐藏以执行以下操作 和跳过航运,支付方式在magento的后端 我试过了 覆盖“Mage/Adminhtml/controllers/Sales/Order/CreateController.php” 使用默认装运和付款方式值的saveaction,如下所示:在后台magento中隐藏和跳过发货、付款方式,magento,Magento,我想 隐藏以执行以下操作 和跳过航运,支付方式在magento的后端 我试过了 覆盖“Mage/Adminhtml/controllers/Sales/Order/CreateController.php” 使用默认装运和付款方式值的saveaction,如下所示: public function saveAction() { try { $this->_processData(); if ($paymentData =
public function saveAction()
{
try {
$this->_processData();
if ($paymentData = $this->getRequest()->getPost('payment')) {
$this->_getOrderCreateModel()->setPaymentData($paymentData);
$this->_getOrderCreateModel()->getQuote()->getPayment()->addData($paymentData);
}
$order = $this->_getOrderCreateModel()
->importPostData($this->getRequest()->getPost('order'))
//------------edit start
->setPaymentMethod('checkmo')
->setShippingMethod('freeshipping_freeshipping')
//------------edit end
->createOrder();
$this->_getSession()->clear();
Mage::getSingleton('adminhtml/session')->addSuccess($this->__('The order has been created.'));
$this->_redirect('*/sales_order/view', array('order_id' => $order->getId()));
}
catch (Mage_Core_Exception $e){
$message = $e->getMessage();
if( !empty($message) ) {
$this->_getSession()->addError($message);
}
$this->_redirect('*/*/');
}
catch (Exception $e){
$this->_getSession()->addException($e, $this->__('Order saving error: %s', $e->getMessage()));
$this->_redirect('*/*/');
}
}
伟大的那么,到目前为止您尝试了什么?您想为后端中的所有用户隐藏吗?还是要隐藏以确定用户?