订单详细内容页手动修改订单状态方法:

打开此文件:app\design\adminhtml\default\default\template\sales\order\view\history.phtml

34行位置为如下原本内容:

            <?php foreach ($this->getStatuses() as $_code=>$_label): ?>

修改为:

            <?php foreach (Mage::getSingleton('sales/order_config')->getStatuses() as $_code=>$_label): ?>

 

刷新缓存,然后刷新订单页面看看,在订单页面的Comments History部分就可以更改订单状态了。

 

手动用php文件修改方法:

在网站跟目录下新建一个php文件

<?php

require_once('app/Mage.php');
umask(0);
Mage::app('default');

$order = Mage::getModel('sales/order');
$order->loadByIncrementId(100000001);  // 100000001为订单编号

// 获取订单状态
$status = $order->getStatus();
$state  = $order->getState();

echo $status;
echo "\r\n";
echo $state;

// 设置订单状态
$order->setStatus(Mage_Sales_Model_Order::STATE_PROCESSING);
$order->save();

?>

posted on 2015-09-02 14:47  闪电王国  阅读(1068)  评论(0编辑  收藏  举报