Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save goodwoor/d6453b1c704a456f9ad0d9078a5e7991 to your computer and use it in GitHub Desktop.
Save goodwoor/d6453b1c704a456f9ad0d9078a5e7991 to your computer and use it in GitHub Desktop.
diff --git a/app/addons/product_variations/schemas/context_menu/product_variations.php b/app/addons/product_variations/schemas/context_menu/product_variations.php
index 8fed54a91d..0f7dcac29e 100644
--- a/app/addons/product_variations/schemas/context_menu/product_variations.php
+++ b/app/addons/product_variations/schemas/context_menu/product_variations.php
@@ -26,17 +26,32 @@ return [
'type' => GroupItem::class,
'items' => [
'make_active' => [
- 'name' => ['template' => 'bulk_edit.make_active'],
+ 'name' => [
+ 'template' => 'change_to_status',
+ 'params' => [
+ '[status]' => __('active')
+ ],
+ ],
'dispatch' => 'products.m_activate',
'position' => 10,
],
'make_disabled' => [
- 'name' => ['template' => 'bulk_edit.make_disabled'],
+ 'name' => [
+ 'template' => 'change_to_status',
+ 'params' => [
+ '[status]' => __('disabled')
+ ],
+ ],
'dispatch' => 'products.m_disable',
'position' => 20,
],
'make_hidden' => [
- 'name' => ['template' => 'bulk_edit.make_hidden'],
+ 'name' => [
+ 'template' => 'change_to_status',
+ 'params' => [
+ '[status]' => __('hidden')
+ ],
+ ],
'dispatch' => 'products.m_hide',
'position' => 30,
],
diff --git a/app/schemas/context_menu/products.php b/app/schemas/context_menu/products.php
index a94ecfdf1c..56ef9b76cb 100644
--- a/app/schemas/context_menu/products.php
+++ b/app/schemas/context_menu/products.php
@@ -44,17 +44,32 @@ return [
'type' => GroupItem::class,
'items' => [
'make_active' => [
- 'name' => ['template' => 'bulk_edit.make_active'],
+ 'name' => [
+ 'template' => 'change_to_status',
+ 'params' => [
+ '[status]' => __('active')
+ ],
+ ],
'dispatch' => 'products.m_activate',
'position' => 10,
],
'make_disabled' => [
- 'name' => ['template' => 'bulk_edit.make_disabled'],
+ 'name' => [
+ 'template' => 'change_to_status',
+ 'params' => [
+ '[status]' => __('disabled')
+ ],
+ ],
'dispatch' => 'products.m_disable',
'position' => 20,
],
'make_hidden' => [
- 'name' => ['template' => 'bulk_edit.make_hidden'],
+ 'name' => [
+ 'template' => 'change_to_status',
+ 'params' => [
+ '[status]' => __('hidden')
+ ],
+ ],
'dispatch' => 'products.m_hide',
'position' => 30,
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment