【发布时间】:2014-09-21 01:17:05
【问题描述】:
这是我的 config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<zee_Checkout>
<version>1.0</version>
</zee_Checkout>
</modules>
<global>
<models>
<zee_Checkout>zee_Checkout_Model</zee_Checkout>
<checkout>
<rewrite>
<type_onepage>zee_Checkout_Model_Type_Onepage</type_onepage>
</rewrite>
</checkout>
</models>
</global>
</config>
这是我的code/local/zee/Checkout/Model/Type/Onepage.php
class zee_Checkout_Model_Type_Onepage extends Mage_Checkout_Model_Type_Onepage
{
public function saveOrder()
{
$this->validate();
$isNewCustomer = false;
switch ($this->getCheckoutMethod()) {
case self::METHOD_GUEST:
$this->_prepareGuestQuote();
break;
case self::METHOD_REGISTER:
$this->_prepareNewCustomerQuote();
$isNewCustomer = true;
break;
default:
$this->_prepareCustomerQuote();
break;
}
....
.....
Only this function needs to be Over-rided...so I wrote just this funciton, nothing else in this file except this function
}
}
问题是......这个函数没有加载......而是从父/核心magento文件执行saveOrder()......
模块已启用并在 Magento 后端显示.. 但代码不执行
有什么想法???我错过了什么吗??
【问题讨论】:
标签: xml class magento overriding checkout