我想
Hide
执行以下操作skip
运费,后端magento中的付款方式方法我试过了 覆盖' Mage / Adminhtml / controllers / Sales / Order / CreateController.php' saveaction(),默认运费和付款方式值如下:
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('*/*/');
}
}