1

In Magento Enteprise there is an option to Move Orders to Archive & then to restore them (Move to Order Management).

However these options only seem to be available if a user belongs to a user role with full/all Resource Access. If they belong to another role with custom resource access there does not seem to be an option to give them access to these features.

Does Magento Enteprsice not give ACL for this feature? What is the best way of adding it?

I've looked at the ACL that Magento Eneteprise has for Enterprise_SalesArchive. It matches what is on the Custom Resource Access list, but does not follow the Sales Orders / Archive Menue structure.

Move Orders to Archive

Move Orders to Archive

Move to Order Management

Move to Order Management

Custom Resource Access

Custom Resource Access

app/code/core/Enterprise/SalesArchive/etc/adminhtml.xml

<?xml version="1.0"?>
<!--
/**
 * Magento Enterprise Edition
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Magento Enterprise Edition License
 * that is bundled with this package in the file LICENSE_EE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.magentocommerce.com/license/enterprise-edition
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    Enterprise
 * @package     Enterprise_SalesArchive
 * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://www.magentocommerce.com/license/enterprise-edition
 */
-->
<config>
    <menu>
        <sales>
            <children>
                <archive translate="title" module="enterprise_salesarchive">
                    <title>Archive</title>
                    <sort_order>15</sort_order>
                    <depends>
                        <config>sales/enterprise_salesarchive/active</config>
                    </depends>
                    <children>
                        <orders translate="title" module="enterprise_salesarchive">
                            <title>Orders</title>
                            <action>adminhtml/sales_archive/orders</action>
                            <sort_order>10</sort_order>
                        </orders>

                        <invoices translate="title" module="enterprise_salesarchive">
                            <title>Invoices</title>
                            <action>adminhtml/sales_archive/invoices</action>
                            <sort_order>20</sort_order>
                        </invoices>

                        <shipments translate="title" module="enterprise_salesarchive">
                            <title>Shipments</title>
                            <action>adminhtml/sales_archive/shipments</action>
                            <sort_order>30</sort_order>
                        </shipments>

                        <creditmemos translate="title" module="enterprise_salesarchive">
                            <title>Credit Memos</title>
                            <action>adminhtml/sales_archive/creditmemos</action>
                            <sort_order>40</sort_order>
                        </creditmemos>
                    </children>
                </archive>
            </children>
        </sales>
    </menu>
    <acl>
      <resources>
            <admin>
                <children>
                    <sales>
                        <children>
                            <archive translate="title" module="enterprise_salesarchive">
                                 <title>Archive</title>
                                 <children>
                                    <orders translate="title">
                                        <title>Orders</title>
                                        <children>
                                            <add translate="title">
                                                <title>Move to Archive</title>
                                            </add>
                                            <remove translate="title">
                                                <title>Restore from Archive</title>
                                            </remove>
                                        </children>
                                    </orders>
                                    <invoices translate="title">
                                        <title>Invoices</title>
                                    </invoices>
                                    <shipments translate="title">
                                        <title>Shipments</title>
                                    </shipments>
                                    <creditmemos translate="title">
                                        <title>Credit Memos</title>
                                    </creditmemos>
                                 </children>
                            </archive>
                        </children>
                    </sales>
                </children>
            </admin>
        </resources>
    </acl>
</config>

app/code/core/Mage/Sales/etc/adminhtml.xml

<?xml version="1.0"?>
<!--
/**
 * Magento Enterprise Edition
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Magento Enterprise Edition License
 * that is bundled with this package in the file LICENSE_EE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.magentocommerce.com/license/enterprise-edition
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    Mage
 * @package     Mage_Sales
 * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://www.magentocommerce.com/license/enterprise-edition
 */
-->
<config>
    <menu>
         <sales translate="title" module="sales">
            <title>Sales</title>
            <sort_order>20</sort_order>
            <depends><module>Mage_Sales</module></depends>
            <children>
                <order translate="title" module="sales">
                    <title>Orders</title>
                    <action>adminhtml/sales_order</action>
                    <sort_order>10</sort_order>
                </order>
                <invoice translate="title" module="sales">
                    <title>Invoices</title>
                    <action>adminhtml/sales_invoice</action>
                    <sort_order>20</sort_order>
                </invoice>
                <shipment translate="title" module="sales">
                    <title>Shipments</title>
                    <action>adminhtml/sales_shipment</action>
                    <sort_order>30</sort_order>
                </shipment>
                <creditmemo translate="title" module="sales">
                    <title>Credit Memos</title>
                    <action>adminhtml/sales_creditmemo</action>
                    <sort_order>40</sort_order>
                </creditmemo>
                <transactions translate="title" module="sales">
                    <title>Transactions</title>
                    <action>adminhtml/sales_transactions</action>
                    <sort_order>50</sort_order>
                </transactions>
                <recurring_profile translate="title" module="sales">
                    <title>Recurring Profiles (beta)</title>
                    <action>adminhtml/sales_recurring_profile</action>
                    <sort_order>60</sort_order>
                </recurring_profile>
                <billing_agreement translate="title" module="sales">
                    <title>Billing Agreements</title>
                    <action>adminhtml/sales_billing_agreement</action>
                    <sort_order>70</sort_order>
                </billing_agreement>
            </children>
         </sales>
         <system>
            <children>
                <order_statuses translate="title" module="sales">
                    <title>Order Statuses</title>
                    <action>adminhtml/sales_order_status</action>
                    <sort_order>105</sort_order>
                </order_statuses>
            </children>
         </system>
    </menu>
    <acl>
        <resources>
            <admin>
                <children>
                    <sales translate="title" module="sales">
                        <title>Sales</title>
                        <children>
                            <order translate="title">
                                <title>Orders</title>
                                <children>
                                    <actions translate="title">
                                        <title>Actions</title>
                                        <children>
                                            <create translate="title"><title>Create</title></create>
                                            <view translate="title"><title>View</title></view>
                                            <email translate="title"><title>Send Order Email</title></email>
                                            <reorder translate="title"><title>Reorder</title></reorder>
                                            <edit translate="title"><title>Edit</title></edit>
                                            <cancel translate="title"><title>Cancel</title></cancel>
                                            <review_payment translate="title"><title>Accept or Deny Payment</title></review_payment>
                                            <capture translate="title"><title>Capture</title></capture>
                                            <invoice translate="title"><title>Invoice</title></invoice>
                                            <creditmemo translate="title"><title>Credit Memos</title></creditmemo>
                                            <hold translate="title"><title>Hold</title></hold>
                                            <unhold translate="title"><title>Unhold</title></unhold>
                                            <ship translate="title"><title>Ship</title></ship>
                                            <comment translate="title"><title>Comment</title></comment>
                                            <reorder translate="title"><title>Reorder</title></reorder>
                                            <emails translate="title"><title>Send Sales Emails</title></emails>
                                        </children>
                                    </actions>
                                </children>
                                <sort_order>10</sort_order>
                            </order>
                            <invoice translate="title">
                                <title>Invoices</title>
                                <sort_order>20</sort_order>
                            </invoice>
                            <shipment translate="title">
                                <title>Shipments</title>
                                <sort_order>30</sort_order>
                            </shipment>
                            <creditmemo translate="title">
                                <title>Credit Memos</title>
                                <sort_order>40</sort_order>
                            </creditmemo>
                            <transactions translate="title">
                                <title>Transactions</title>
                                <children>
                                    <fetch translate="title"><title>Fetch</title></fetch>
                                </children>
                                <sort_order>50</sort_order>
                            </transactions>
                            <recurring_profile translate="title">
                                <title>Recurring Profiles</title>
                                <sort_order>60</sort_order>
                            </recurring_profile>
                            <billing_agreement translate="title">
                                <title>Billing Agreements</title>
                                    <children>
                                        <actions translate="title">
                                            <title>Actions</title>
                                            <children>
                                                <view translate="title">
                                                    <title>View</title>
                                                    <sort_order>5</sort_order>
                                                </view>
                                                <manage translate="title">
                                                    <title>Manage</title>
                                                    <sort_order>10</sort_order>
                                                </manage>
                                                <use translate="title">
                                                    <title>Place Order Using Billing Agreements</title>
                                                    <sort_order>15</sort_order>
                                                </use>
                                            </children>
                                        </actions>
                                    </children>
                                <sort_order>70</sort_order>
                            </billing_agreement>
                        </children>
                    </sales>
                    <system>
                        <children>
                            <order_statuses>
                                <title>Order Statuses</title>
                                <sort_order>15</sort_order>
                            </order_statuses>
                            <config>
                                <children>
                                    <sales translate="title">
                                        <title>Sales Section</title>
                                        <sort_order>60</sort_order>
                                    </sales>
                                    <sales_email translate="title">
                                        <title>Sales Emails Section</title>
                                        <sort_order>65</sort_order>
                                    </sales_email>
                                    <sales_pdf translate="title">
                                        <title>PDF Print-outs</title>
                                        <sort_order>66</sort_order>
                                    </sales_pdf>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
</config>
  • Did you try to contact EE support and ask for an explanation? – Anna Völkl Feb 24 '15 at 18:25
  • @AnnaVölkl, No, after explaining the issue the client he didn't want us to spend anymore support hours on it, so I left it. I never thought of contacting them about it, it's a good idea. – Holly Feb 25 '15 at 9:55
  • Will you contact EE support and add an explanation later here? If so, we can keep the question open. Otherwise we'll close it. – Anna Völkl Feb 25 '15 at 12:12
  • @AnnaVölkl, I opened a ticket with EE support, will update here when I get a responce – Holly Feb 25 '15 at 12:54
  • Cool, thanks! Looking forward to the response. – Anna Völkl Feb 25 '15 at 13:58
1

Got in touch with Magento EE and they said it was a bug for which they gave me a patch that solved the issue.


Magento EE Response

The developers confirmed that this is a bug. I am happy to inform you that there is a patch available to fix this issue in the core Magento installation, which I have attached here. Please upload the patch into your Magento root directory and run the SSH command below.

sh PATCH_SUPEE-447_EE_1.9.1.1_v1.sh

Once that is done, refresh the cache in the Admin under "System > Cache Management" so that the changes will be reflected. Please try it on a test environment first before taking it live, and kindly confirm that patch provided has resolved your issue


To get the patch you need to contact EE support by logging into your Magento Account and opening a ticket. Instructions on how to apply the patch can be found here.

After applying the patch I could see with git that it changed just two lines of code, the same line of code in two files.

app/code/core/Enterprise/SalesArchive/Block/Adminhtml/Sales/Archive/Order/Grid.php

and

app/code/core/Enterprise/SalesArchive/Block/Adminhtml/Sales/Order/Grid/Massaction.php

from

if ($isActive && Mage::getSingleton('admin/session')->isAllowed('sales/archive/order/add')) {

to

if ($isActive && Mage::getSingleton('admin/session')->isAllowed('sales/archive/orders/add')) {

on line line 100 of Grid.php and 41 of Massaction.php. It was a typo, they added an s to order.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.