从 magento 列表中删除特定订单状态

发布于 2024-09-15 21:14:41 字数 748 浏览 3 评论 0原文

我正在使用扩展

http://www.magentocommerce.com/magento-connect/eitai2001/extension/1468/order-status/reviews#reviews" magentocommerce.com/magento-connect/eitai2001/extension/1468/order-status/reviews#reviews

of magento 提供了大量订单状态..但我的需求有限..所以我想删除一些状态从我的订单状态列表中...我该怎么做...请帮助 谢谢!

已编辑 我在 config.xml 中进行了更改 如果我评论任何订单状态...像这样

但在组合框中(管理站点中显示状态)仍然 processing_cc_settled 出现在 处理 - 信用卡已结算 出现的同一位置在发表评论之前

I am using extension

http://www.magentocommerce.com/magento-connect/eitai2001/extension/1468/order-status/reviews#reviews

of magento which provide a lot of order status..but my need is limited ..so i want to remove some status from my order-status list... how can i do this..please help
Thanks!

Edited
I made change in config.xml
If I comment any order-status ... like this

<!--<processing_cc_settled translate="label"><label>Processing - Credit Card has been Settled</label></processing_cc_settled>-->

but in combobox(where status shows in admin site )still processing_cc_settled appears at the same place where Processing - Credit Card has been Settled showing up before commenting

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你在看孤独的风景 2024-09-22 21:14:41

如果这与我所看到的安装一个客户端站点的扩展相同,那么它的 /etc 子目录中应该包含一个 config.xml 文件(注意:不是全局 /app/etc,而是在 /app/etc 中的某个位置) /app/code/community/ 文件夹)。在此文件中,您将找到所有附加状态的定义。把你不想要的注释掉即可。您还可以更改留下的内容,以便它们更适合您的需求。

澄清:

这是我的 config.xml 的一部分:

<config>
    <modules>
        <Mage_Sales_Community>
            <version>0.1.2</version>
        </Mage_Sales_Community>
    </modules>
    <global>
        <sales>
            <order>
                <statuses>
                    <!--Complete Status Descriptions-->
                    <complete translate="label"><label>Dispatched</label></complete>
                    <!--Cancelled Status Descriptions-->
                    <canceled translate="label"><label>Suspended</label></canceled>
                    <!--<canceled_discontinued translate="label"><label>Suspended - No stock</label></canceled_discontinued> -->
                    <!-- /* Additional custom statuses will go here */ -->
                    <!-- Format of a status description is <name_of_status translate="label"><label>Name of Status</label?</name_of_status> -->
                </statuses>
            </order>
        </sales>
    </global>
</config>

请注意,完成和取消定义了不同的标签。还有一个cancel_discontinued状态,但它不被使用,因为整个条目被注释掉了。如果您发表评论后该条目仍保留在订单评论下拉列表中,请确保您已刷新缓存...

If this is the same extension that I have seen installed one client's site then it should have a config.xml file included in its /etc subdirectory (NOTE: not the global /app/etc but somwhere in the /app/code/community/ folder). In this file you will find definitions for all the additional statuses. Just comment out the ones you don't want. You can also change the ones that you leave so that they are better suited to your needs.

CLARIFICATION:

Here's a piece of my config.xml:

<config>
    <modules>
        <Mage_Sales_Community>
            <version>0.1.2</version>
        </Mage_Sales_Community>
    </modules>
    <global>
        <sales>
            <order>
                <statuses>
                    <!--Complete Status Descriptions-->
                    <complete translate="label"><label>Dispatched</label></complete>
                    <!--Cancelled Status Descriptions-->
                    <canceled translate="label"><label>Suspended</label></canceled>
                    <!--<canceled_discontinued translate="label"><label>Suspended - No stock</label></canceled_discontinued> -->
                    <!-- /* Additional custom statuses will go here */ -->
                    <!-- Format of a status description is <name_of_status translate="label"><label>Name of Status</label?</name_of_status> -->
                </statuses>
            </order>
        </sales>
    </global>
</config>

Note that complete and canceled have a different label defined. There is also a canceled_discontinued status, but it is not used as the whole entry is commented out. If the entry stays on the order comments dropdown after you have commented it make sure that you have refreshed the cache...

鹿童谣 2024-09-22 21:14:41

我在安装脚本中添加/删除 magento 状态,使用如下所示:

<?php
$installer = $this;

/*
Possible states:

Mage_Sales_Model_Order::STATE_CANCELED
Mage_Sales_Model_Order::STATE_CLOSED
Mage_Sales_Model_Order::STATE_COMPLETE
Mage_Sales_Model_Order::STATE_HOLDED
Mage_Sales_Model_Order::STATE_NEW
Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW
Mage_Sales_Model_Order::STATE_PENDING_PAYMENT
Mage_Sales_Model_Order::STATE_PROCESSING         
*/

$installer->startSetup();

// Get status model
$status = Mage::getModel('sales/order_status');


// Delete some statuses
$status->setStatus('processing_cc_settled')->delete();
$status->setStatus('another_status_code_to_delete')->delete();


//Add a new status
$status->setStatus('holded_cc_error')
       ->setLabel('On Hold: CC Error')
       ->assignState(Mage_Sales_Model_Order::STATE_HOLDED) 
//for example, use any available existing state from above
       ->save();

//To set an order to this status:
//$order->setData('state', "holded");
//$order->setStatus("holded_cc_error");
//$order->save();

$installer->endSetup();

I add/remove magento statuses in install scripts, using something like below:

<?php
$installer = $this;

/*
Possible states:

Mage_Sales_Model_Order::STATE_CANCELED
Mage_Sales_Model_Order::STATE_CLOSED
Mage_Sales_Model_Order::STATE_COMPLETE
Mage_Sales_Model_Order::STATE_HOLDED
Mage_Sales_Model_Order::STATE_NEW
Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW
Mage_Sales_Model_Order::STATE_PENDING_PAYMENT
Mage_Sales_Model_Order::STATE_PROCESSING         
*/

$installer->startSetup();

// Get status model
$status = Mage::getModel('sales/order_status');


// Delete some statuses
$status->setStatus('processing_cc_settled')->delete();
$status->setStatus('another_status_code_to_delete')->delete();


//Add a new status
$status->setStatus('holded_cc_error')
       ->setLabel('On Hold: CC Error')
       ->assignState(Mage_Sales_Model_Order::STATE_HOLDED) 
//for example, use any available existing state from above
       ->save();

//To set an order to this status:
//$order->setData('state', "holded");
//$order->setStatus("holded_cc_error");
//$order->save();

$installer->endSetup();
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文