Skip to content

Commit 298da3c

Browse files
bojanzbojanz
authored andcommitted
Issue #2885483 by Hubbs, gauravjeet, bojanz, AaronChristian, rszrama: Improve the Commerce configuration UX
1 parent 289a07e commit 298da3c

13 files changed

+93
-27
lines changed

commerce.links.menu.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@ commerce.admin_commerce:
22
title: 'Commerce'
33
route_name: 'commerce.admin_commerce'
44
parent: 'system.admin'
5-
description: 'Administer your commerce data and configuration.'
5+
description: 'Administer and configure your Commerce store.'
66
weight: -9
77

88
commerce.configuration:
99
title: 'Configuration'
1010
route_name: 'commerce.configuration'
1111
parent: 'commerce.admin_commerce'
12-
description: 'Configure your store and Commerce module settings.'
12+
description: 'Configure your store settings and structure.'
1313
weight: 10
14+
15+
commerce.store_configuration:
16+
title: 'Store'
17+
route_name: 'commerce.store_configuration'
18+
parent: 'commerce.configuration'
19+
weight: -20

commerce.routing.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@ commerce.admin_commerce:
99
commerce.configuration:
1010
path: '/admin/commerce/config'
1111
defaults:
12-
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
12+
_controller: '\Drupal\system\Controller\SystemController::overview'
13+
link_id: 'commerce.configuration'
1314
_title: 'Configuration'
1415
requirements:
1516
_permission: 'access commerce administration pages'
17+
18+
commerce.store_configuration:
19+
path: '/admin/commerce/config/store'
20+
defaults:
21+
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
22+
_title: 'Store'
23+
requirements:
24+
_permission: 'access commerce administration pages'

modules/cart/commerce_cart.module

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ use Drupal\Core\Field\BaseFieldDefinition;
1111
use Drupal\Core\Form\FormStateInterface;
1212
use Drupal\Core\Session\AnonymousUserSession;
1313

14+
/**
15+
* Implements hook_menu_links_discovered_alter().
16+
*/
17+
function commerce_cart_menu_links_discovered_alter(&$links) {
18+
$description = t('Manage fields, Add to Cart forms, other form and display settings for your order items.');
19+
$links['entity.commerce_order_item_type.collection']['description'] = $description;
20+
}
21+
1422
/**
1523
* Implements hook_theme().
1624
*/
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
entity.commerce_checkout_flow.collection:
22
title: 'Checkout flows'
33
route_name: 'entity.commerce_checkout_flow.collection'
4-
parent: 'commerce.configuration'
5-
description: 'Manage your checkout flows.'
4+
parent: 'commerce_order.configuration'
5+
description: 'Configure your checkout forms.'
Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1+
commerce_order.configuration:
2+
title: 'Orders'
3+
route_name: 'commerce_order.configuration'
4+
parent: 'commerce.configuration'
5+
weight: -5
6+
17
entity.commerce_order.collection:
2-
title: Orders
3-
route_name: entity.commerce_order.collection
4-
parent: commerce.admin_commerce
8+
title: 'Orders'
9+
route_name: 'entity.commerce_order.collection'
10+
parent: 'commerce.admin_commerce'
511
description: 'Manage your orders.'
612

713
entity.commerce_order_type.collection:
8-
title: Order types
9-
route_name: entity.commerce_order_type.collection
10-
parent: commerce.configuration
11-
description: 'Manage your order types.'
14+
title: 'Order types'
15+
route_name: 'entity.commerce_order_type.collection'
16+
parent: 'commerce_order.configuration'
17+
description: 'Manage fields, form and display settings for your orders.'
18+
weight: -10
1219

1320
entity.commerce_order_item_type.collection:
14-
title: Order item types
15-
route_name: entity.commerce_order_item_type.collection
16-
parent: commerce.configuration
17-
description: 'Manage your order item types.'
21+
title: 'Order item types'
22+
route_name: 'entity.commerce_order_item_type.collection'
23+
parent: 'commerce_order.configuration'
24+
description: 'Manage fields, form and display settings for your order items.'
25+
weight: -5

modules/order/commerce_order.routing.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
commerce_order.configuration:
2+
path: '/admin/commerce/config/orders'
3+
defaults:
4+
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
5+
_title: 'Orders'
6+
requirements:
7+
_permission: 'access commerce administration pages'
8+
19
entity.commerce_order.add_page:
210
path: '/admin/commerce/orders/add'
311
defaults:
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
commerce_payment.configuration:
2+
title: 'Payment'
3+
route_name: 'commerce_payment.configuration'
4+
parent: 'commerce.configuration'
5+
weight: -10
6+
17
entity.commerce_payment_gateway.collection:
28
title: 'Payment gateways'
39
route_name: 'entity.commerce_payment_gateway.collection'
4-
parent: 'commerce.configuration'
5-
description: 'Manage your payment gateways.'
10+
parent: 'commerce_payment.configuration'
11+
description: 'Configure the gateways you take payment through.'

modules/payment/commerce_payment.routing.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
commerce_payment.configuration:
2+
path: '/admin/commerce/config/payment'
3+
defaults:
4+
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
5+
_title: 'Payment'
6+
requirements:
7+
_permission: 'access commerce administration pages'
8+
19
entity.commerce_payment.add_form:
210
path: '/admin/commerce/orders/{commerce_order}/payments/add'
311
defaults:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
entity.commerce_currency.collection:
22
title: Currencies
33
route_name: entity.commerce_currency.collection
4-
parent: commerce.configuration
4+
parent: 'commerce.store_configuration'
55
description: 'Manage your currencies.'

modules/product/commerce_product.links.menu.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
commerce_product.configuration:
2+
title: 'Products'
3+
route_name: 'commerce_product.configuration'
4+
parent: 'commerce.configuration'
5+
weight: -15
6+
17
entity.commerce_product.collection:
28
title: 'Products'
39
route_name: 'entity.commerce_product.collection'
@@ -13,11 +19,11 @@ entity.commerce_product_attribute.collection:
1319
entity.commerce_product_type.collection:
1420
title: 'Product types'
1521
route_name: 'entity.commerce_product_type.collection'
16-
parent: 'commerce.configuration'
17-
description: 'Manage your product types.'
22+
parent: 'commerce_product.configuration'
23+
description: 'Manage fields, form and display settings for your products.'
1824

1925
entity.commerce_product_variation_type.collection:
2026
title: 'Product variation types'
2127
route_name: 'entity.commerce_product_variation_type.collection'
22-
parent: 'commerce.configuration'
23-
description: 'Manage your product variation types.'
28+
parent: 'commerce_product.configuration'
29+
description: 'Manage fields, form and display settings for your product variations.'

0 commit comments

Comments
 (0)