Magento 2: how to remove order actions elements?How to fix warnings / errors raised by the Magento Marketplace technical review report?How do I remove Admin from my shipping label?Magento 2 order flow sequenceMagento 2 How to fetch rest API array valueMagento 2 - Create UPS shipping label for order with offline shipping optionMagento 2 : Remove wishlist item eventSpecial Price From Date and Special Price To Date not visible in backend M2How to get single PDF (Table Format)of all order invoices having required fields in Magento2Magento2 : Remove shipping charge and credit cart type and number from order invoiceMagento 2: Remove ReferenceBlock - Order Information
Which is a better conductor, a very thick rubber wire or a very thin copper wire?
How to say "is going" in Russian in "this game is going to perish"
Those who speak do not know, those who know do not speak
E12 LED light bulb flickers when OFF in candelabra
Does anyone have a method of differentiating informative comments from commented out code?
What exactly is a "murder hobo"?
I don't want to be introduced as a "Minority Novelist"
Interpretation of non-significant results as "trends"
How do I talk to my wife about unrealistic expectations?
Sorting a list according to some pre-specified rules
What do you call a situation where you have choices but no good choice?
How many Jimmys can fit?
QR codes, do people use them?
This LM317 diagram doesn't make any sense to me
Category-theoretic treatment of diffs, patches and merging?
Why SQL does not use the indexed view?
How was the website able to tell my credit card was wrong before it processed it?
NOLOCK or Read Uncommitted locking / latching behaviours
Ping failure monitor
Movie featuring a De Lorean - NOT Back to the Future
Diagram with cylinder shapes and rectangles
What is the shape of the upper boundary of water hitting a screen?
Can a wizard use the spell Levitate on a target and shoot him with attacking spells that don't require concentration?
Computer name naming convention for security
Magento 2: how to remove order actions elements?
How to fix warnings / errors raised by the Magento Marketplace technical review report?How do I remove Admin from my shipping label?Magento 2 order flow sequenceMagento 2 How to fetch rest API array valueMagento 2 - Create UPS shipping label for order with offline shipping optionMagento 2 : Remove wishlist item eventSpecial Price From Date and Special Price To Date not visible in backend M2How to get single PDF (Table Format)of all order invoices having required fields in Magento2Magento2 : Remove shipping charge and credit cart type and number from order invoiceMagento 2: Remove ReferenceBlock - Order Information
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Magento order actions: https://docs.magento.com/m2/2.2/ee/user_guide/sales/order-actions.html
Would like to remove some of these from the list, like "Print Credit Memos", "Print Shipping Labels"
Does anybody know how to do? Thank you
magento2
add a comment |
Magento order actions: https://docs.magento.com/m2/2.2/ee/user_guide/sales/order-actions.html
Would like to remove some of these from the list, like "Print Credit Memos", "Print Shipping Labels"
Does anybody know how to do? Thank you
magento2
add a comment |
Magento order actions: https://docs.magento.com/m2/2.2/ee/user_guide/sales/order-actions.html
Would like to remove some of these from the list, like "Print Credit Memos", "Print Shipping Labels"
Does anybody know how to do? Thank you
magento2
Magento order actions: https://docs.magento.com/m2/2.2/ee/user_guide/sales/order-actions.html
Would like to remove some of these from the list, like "Print Credit Memos", "Print Shipping Labels"
Does anybody know how to do? Thank you
magento2
magento2
edited Jun 28 at 9:27
poojan sharma
8251 silver badge10 bronze badges
8251 silver badge10 bronze badges
asked Jun 28 at 9:17
JosíasJosías
134 bronze badges
134 bronze badges
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Override vendor/magento/module-sales/view/adminhtml/ui_component/sales_order_grid.xml
Remove below code from it:
<action name="pdfcreditmemos_order">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">pdfcreditmemos_order</item>
<item name="label" xsi:type="string" translate="true">Print Credit Memos</item>
<item name="url" xsi:type="url" path="sales/order/pdfcreditmemos"/>
</item>
</argument>
</action>
<action name="print_shipping_label">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">print_shipping_label</item>
<item name="label" xsi:type="string" translate="true">Print Shipping Labels</item>
<item name="url" xsi:type="url" path="adminhtml/order_shipment/massPrintShippingLabel"/>
</item>
</argument>
</action>
add a comment |
MassAction.php
file add action which you want to remove
Step 1: Create a file
app/code/Stack/RuleBasedDiscount/view/adminhtml/ui_component/sales_order_grid.xml
and put the following code:
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<listingToolbar name="listing_top">
<massaction name="listing_massaction" class="StackRuleBasedDiscountUiMassAction">
</massaction>
</listingToolbar>
</listing>
Step 2: Create the file
app/code/Stack/RuleBasedDiscount/Ui/MassAction.php
and put the following code:
<?php
namespace StackRuleBasedDiscountUi;
class MassAction extends MagentoUiComponentMassAction
private $authorization;
public function __construct(
MagentoFrameworkViewElementUiComponentContextInterface $context,
MagentoFrameworkAuthorizationInterface $authorization,
array $components,
array $data
)
$this->authorization = $authorization;
parent::__construct($context, $components, $data);
public function prepare()
parent::prepare();
$config = $this->getConfiguration();
//if (!$this->authorization->isAllowed('Magento_Catalog::the_acl_youd_like_to_use'))
$allowedActions = [];
foreach ($config['actions'] as $action)
if ('pdfinvoices_order' != $action['type']) //add action which you remove
$allowedActions[] = $action;
$config['actions'] = $allowedActions;
//
$this->setData('config', (array)$config);
Step 3: Run the following commands under document root:
php bin/magento s:up
php bin/magento cache:flush
Hesitating a lot between your answer and Anas Masuri answer. Both solutions are working fine. Yours seems to be more professional. However his solution is much easier to implement and also effective. I can select as solution both answers, but choosed the other one because it's more simple. In any case, thank you very much for your answer. It's very usefull to learn Magento.
– Josías
Jun 28 at 14:32
no probleam...:) happy coding..:)
– Rk Rathod
Jun 28 at 14:56
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f280033%2fmagento-2-how-to-remove-order-actions-elements%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Override vendor/magento/module-sales/view/adminhtml/ui_component/sales_order_grid.xml
Remove below code from it:
<action name="pdfcreditmemos_order">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">pdfcreditmemos_order</item>
<item name="label" xsi:type="string" translate="true">Print Credit Memos</item>
<item name="url" xsi:type="url" path="sales/order/pdfcreditmemos"/>
</item>
</argument>
</action>
<action name="print_shipping_label">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">print_shipping_label</item>
<item name="label" xsi:type="string" translate="true">Print Shipping Labels</item>
<item name="url" xsi:type="url" path="adminhtml/order_shipment/massPrintShippingLabel"/>
</item>
</argument>
</action>
add a comment |
Override vendor/magento/module-sales/view/adminhtml/ui_component/sales_order_grid.xml
Remove below code from it:
<action name="pdfcreditmemos_order">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">pdfcreditmemos_order</item>
<item name="label" xsi:type="string" translate="true">Print Credit Memos</item>
<item name="url" xsi:type="url" path="sales/order/pdfcreditmemos"/>
</item>
</argument>
</action>
<action name="print_shipping_label">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">print_shipping_label</item>
<item name="label" xsi:type="string" translate="true">Print Shipping Labels</item>
<item name="url" xsi:type="url" path="adminhtml/order_shipment/massPrintShippingLabel"/>
</item>
</argument>
</action>
add a comment |
Override vendor/magento/module-sales/view/adminhtml/ui_component/sales_order_grid.xml
Remove below code from it:
<action name="pdfcreditmemos_order">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">pdfcreditmemos_order</item>
<item name="label" xsi:type="string" translate="true">Print Credit Memos</item>
<item name="url" xsi:type="url" path="sales/order/pdfcreditmemos"/>
</item>
</argument>
</action>
<action name="print_shipping_label">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">print_shipping_label</item>
<item name="label" xsi:type="string" translate="true">Print Shipping Labels</item>
<item name="url" xsi:type="url" path="adminhtml/order_shipment/massPrintShippingLabel"/>
</item>
</argument>
</action>
Override vendor/magento/module-sales/view/adminhtml/ui_component/sales_order_grid.xml
Remove below code from it:
<action name="pdfcreditmemos_order">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">pdfcreditmemos_order</item>
<item name="label" xsi:type="string" translate="true">Print Credit Memos</item>
<item name="url" xsi:type="url" path="sales/order/pdfcreditmemos"/>
</item>
</argument>
</action>
<action name="print_shipping_label">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">print_shipping_label</item>
<item name="label" xsi:type="string" translate="true">Print Shipping Labels</item>
<item name="url" xsi:type="url" path="adminhtml/order_shipment/massPrintShippingLabel"/>
</item>
</argument>
</action>
answered Jun 28 at 9:50
Anas MansuriAnas Mansuri
75216 bronze badges
75216 bronze badges
add a comment |
add a comment |
MassAction.php
file add action which you want to remove
Step 1: Create a file
app/code/Stack/RuleBasedDiscount/view/adminhtml/ui_component/sales_order_grid.xml
and put the following code:
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<listingToolbar name="listing_top">
<massaction name="listing_massaction" class="StackRuleBasedDiscountUiMassAction">
</massaction>
</listingToolbar>
</listing>
Step 2: Create the file
app/code/Stack/RuleBasedDiscount/Ui/MassAction.php
and put the following code:
<?php
namespace StackRuleBasedDiscountUi;
class MassAction extends MagentoUiComponentMassAction
private $authorization;
public function __construct(
MagentoFrameworkViewElementUiComponentContextInterface $context,
MagentoFrameworkAuthorizationInterface $authorization,
array $components,
array $data
)
$this->authorization = $authorization;
parent::__construct($context, $components, $data);
public function prepare()
parent::prepare();
$config = $this->getConfiguration();
//if (!$this->authorization->isAllowed('Magento_Catalog::the_acl_youd_like_to_use'))
$allowedActions = [];
foreach ($config['actions'] as $action)
if ('pdfinvoices_order' != $action['type']) //add action which you remove
$allowedActions[] = $action;
$config['actions'] = $allowedActions;
//
$this->setData('config', (array)$config);
Step 3: Run the following commands under document root:
php bin/magento s:up
php bin/magento cache:flush
Hesitating a lot between your answer and Anas Masuri answer. Both solutions are working fine. Yours seems to be more professional. However his solution is much easier to implement and also effective. I can select as solution both answers, but choosed the other one because it's more simple. In any case, thank you very much for your answer. It's very usefull to learn Magento.
– Josías
Jun 28 at 14:32
no probleam...:) happy coding..:)
– Rk Rathod
Jun 28 at 14:56
add a comment |
MassAction.php
file add action which you want to remove
Step 1: Create a file
app/code/Stack/RuleBasedDiscount/view/adminhtml/ui_component/sales_order_grid.xml
and put the following code:
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<listingToolbar name="listing_top">
<massaction name="listing_massaction" class="StackRuleBasedDiscountUiMassAction">
</massaction>
</listingToolbar>
</listing>
Step 2: Create the file
app/code/Stack/RuleBasedDiscount/Ui/MassAction.php
and put the following code:
<?php
namespace StackRuleBasedDiscountUi;
class MassAction extends MagentoUiComponentMassAction
private $authorization;
public function __construct(
MagentoFrameworkViewElementUiComponentContextInterface $context,
MagentoFrameworkAuthorizationInterface $authorization,
array $components,
array $data
)
$this->authorization = $authorization;
parent::__construct($context, $components, $data);
public function prepare()
parent::prepare();
$config = $this->getConfiguration();
//if (!$this->authorization->isAllowed('Magento_Catalog::the_acl_youd_like_to_use'))
$allowedActions = [];
foreach ($config['actions'] as $action)
if ('pdfinvoices_order' != $action['type']) //add action which you remove
$allowedActions[] = $action;
$config['actions'] = $allowedActions;
//
$this->setData('config', (array)$config);
Step 3: Run the following commands under document root:
php bin/magento s:up
php bin/magento cache:flush
Hesitating a lot between your answer and Anas Masuri answer. Both solutions are working fine. Yours seems to be more professional. However his solution is much easier to implement and also effective. I can select as solution both answers, but choosed the other one because it's more simple. In any case, thank you very much for your answer. It's very usefull to learn Magento.
– Josías
Jun 28 at 14:32
no probleam...:) happy coding..:)
– Rk Rathod
Jun 28 at 14:56
add a comment |
MassAction.php
file add action which you want to remove
Step 1: Create a file
app/code/Stack/RuleBasedDiscount/view/adminhtml/ui_component/sales_order_grid.xml
and put the following code:
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<listingToolbar name="listing_top">
<massaction name="listing_massaction" class="StackRuleBasedDiscountUiMassAction">
</massaction>
</listingToolbar>
</listing>
Step 2: Create the file
app/code/Stack/RuleBasedDiscount/Ui/MassAction.php
and put the following code:
<?php
namespace StackRuleBasedDiscountUi;
class MassAction extends MagentoUiComponentMassAction
private $authorization;
public function __construct(
MagentoFrameworkViewElementUiComponentContextInterface $context,
MagentoFrameworkAuthorizationInterface $authorization,
array $components,
array $data
)
$this->authorization = $authorization;
parent::__construct($context, $components, $data);
public function prepare()
parent::prepare();
$config = $this->getConfiguration();
//if (!$this->authorization->isAllowed('Magento_Catalog::the_acl_youd_like_to_use'))
$allowedActions = [];
foreach ($config['actions'] as $action)
if ('pdfinvoices_order' != $action['type']) //add action which you remove
$allowedActions[] = $action;
$config['actions'] = $allowedActions;
//
$this->setData('config', (array)$config);
Step 3: Run the following commands under document root:
php bin/magento s:up
php bin/magento cache:flush
MassAction.php
file add action which you want to remove
Step 1: Create a file
app/code/Stack/RuleBasedDiscount/view/adminhtml/ui_component/sales_order_grid.xml
and put the following code:
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<listingToolbar name="listing_top">
<massaction name="listing_massaction" class="StackRuleBasedDiscountUiMassAction">
</massaction>
</listingToolbar>
</listing>
Step 2: Create the file
app/code/Stack/RuleBasedDiscount/Ui/MassAction.php
and put the following code:
<?php
namespace StackRuleBasedDiscountUi;
class MassAction extends MagentoUiComponentMassAction
private $authorization;
public function __construct(
MagentoFrameworkViewElementUiComponentContextInterface $context,
MagentoFrameworkAuthorizationInterface $authorization,
array $components,
array $data
)
$this->authorization = $authorization;
parent::__construct($context, $components, $data);
public function prepare()
parent::prepare();
$config = $this->getConfiguration();
//if (!$this->authorization->isAllowed('Magento_Catalog::the_acl_youd_like_to_use'))
$allowedActions = [];
foreach ($config['actions'] as $action)
if ('pdfinvoices_order' != $action['type']) //add action which you remove
$allowedActions[] = $action;
$config['actions'] = $allowedActions;
//
$this->setData('config', (array)$config);
Step 3: Run the following commands under document root:
php bin/magento s:up
php bin/magento cache:flush
answered Jun 28 at 10:33
Rk RathodRk Rathod
2,5433 silver badges22 bronze badges
2,5433 silver badges22 bronze badges
Hesitating a lot between your answer and Anas Masuri answer. Both solutions are working fine. Yours seems to be more professional. However his solution is much easier to implement and also effective. I can select as solution both answers, but choosed the other one because it's more simple. In any case, thank you very much for your answer. It's very usefull to learn Magento.
– Josías
Jun 28 at 14:32
no probleam...:) happy coding..:)
– Rk Rathod
Jun 28 at 14:56
add a comment |
Hesitating a lot between your answer and Anas Masuri answer. Both solutions are working fine. Yours seems to be more professional. However his solution is much easier to implement and also effective. I can select as solution both answers, but choosed the other one because it's more simple. In any case, thank you very much for your answer. It's very usefull to learn Magento.
– Josías
Jun 28 at 14:32
no probleam...:) happy coding..:)
– Rk Rathod
Jun 28 at 14:56
Hesitating a lot between your answer and Anas Masuri answer. Both solutions are working fine. Yours seems to be more professional. However his solution is much easier to implement and also effective. I can select as solution both answers, but choosed the other one because it's more simple. In any case, thank you very much for your answer. It's very usefull to learn Magento.
– Josías
Jun 28 at 14:32
Hesitating a lot between your answer and Anas Masuri answer. Both solutions are working fine. Yours seems to be more professional. However his solution is much easier to implement and also effective. I can select as solution both answers, but choosed the other one because it's more simple. In any case, thank you very much for your answer. It's very usefull to learn Magento.
– Josías
Jun 28 at 14:32
no probleam...:) happy coding..:)
– Rk Rathod
Jun 28 at 14:56
no probleam...:) happy coding..:)
– Rk Rathod
Jun 28 at 14:56
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f280033%2fmagento-2-how-to-remove-order-actions-elements%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown