0
我目前正在寻找一种方法,我可以根据order id
,customer email
和customer last name
获得订单状态。从订单编号,电子邮件和客户姓氏获取订单状态
我写这段代码到目前为止
public function orderHistoryAction(){
$req = $this->getRequest();
$oid = $req->getParam('oid', '');
$lnm = $req->getParam('lnm', '');
$eml = $req->getParam('eml', '');
$order = Mage::getModel('sales/order')->loadByIncrementId($oid);
if ($order->getId()) {
if ((strcasecmp($lnm, $order->getCustomerLastname()) == 0) && (strcasecmp($eml, $order->getCustomerEmail()) == 0)) {
echo $order->getStatusLabel();
} else {
echo 'invalid';
}
} else {
echo 'invalid';
}
}
,并为双方客户和客人运作良好。但这在我看来并不是正确的做法。我应该使用像写在this blog或here too。如果有人能让我正确吗?
可以明显地使一个新的模块,以得到订单状态订单编号,电子邮件和客户的姓氏。在你的模块中使用一个观察者相同。 – Slimshadddyyy
是不是在我的模块中存储信息的开销他们显示状态? –