From e52aa6147310a00783dde9edc42899e834edc3d7 Mon Sep 17 00:00:00 2001 From: Su <112690947+sushmangupta@users.noreply.github.com> Date: Wed, 25 Oct 2023 12:10:32 +0200 Subject: [PATCH] Organize B2B topics & update info for few articles (#1041) * docs: organize B2B topics & update infos Co-authored-by: King-of-Babylon <31991012+King-of-Babylon@users.noreply.github.com> Co-authored-by: sushma gupta Co-authored-by: Nils Haberkamp * Fix Readme.md and links * Remove Summary.md * Add redirects and more index.md changes * Add asterix as wildcard --------- Co-authored-by: Lars Kemper Co-authored-by: King-of-Babylon <31991012+King-of-Babylon@users.noreply.github.com> Co-authored-by: Nils Haberkamp Co-authored-by: Micha Hobert --- .gitbook.yaml | 2 ++ .../employee-management/concept/index.md | 10 ------ .../creating-own-permissions-via-app.md | 33 ------------------ .../employee-management/guides/index.md | 10 ------ .../employee-management/index.md | 22 ------------ products/extensions/b2b-components/index.md | 10 ------ .../b2b-suite/guides/administration/index.md | 10 ------ .../api-route-restriction-for-employees.md | 0 .../concept/entities-and-schema.md | 0 .../employee-management/concept/index.md | 8 +++++ .../b2b-employee-invite-registration.md | 5 +++ .../creating-own-permissions-via-app.md | 11 ++++++ .../creating-own-permissions-via-plugin.md | 0 .../guides/b2b-permissions/index.md | 20 +++++++++++ .../employee-management/guides/b2b-roles.md | 5 +++ .../employee-management/guides/index.md | 3 ++ .../employee-management/index.md | 17 +++++++++ .../extensions/b2b/b2b-components/index.md | 13 +++++++ .../b2b-suite/concept/basic-conventions.md | 0 .../{ => b2b}/b2b-suite/concept/index.md | 0 .../b2b-suite/concept/line-item-list.md | 0 .../b2b-suite/concept/method-structure.md | 0 .../b2b-suite/concept/system-architecture.md | 0 .../b2b-suite/guides/administration/index.md | 3 ++ .../guides/core/assignment-service.md | 0 .../b2b-suite/guides/core/audit-log.md | 0 .../b2b-suite/guides/core/authentication.md | 0 .../b2b-suite/guides/core/crud-service.md | 0 .../b2b-suite/guides/core/currency.md | 0 .../guides/core/dependency-injection.md | 0 .../b2b-suite/guides/core/entity-acl.md | 0 .../b2b-suite/guides/core/exception.md | 0 .../{ => b2b}/b2b-suite/guides/core/index.md | 0 .../b2b-suite/guides/core/listing-service.md | 0 .../b2b-suite/guides/core/overload-classes.md | 0 .../b2b-suite/guides/core/rest-api.md | 0 .../b2b-suite/guides/core/store-api.md | 0 .../guides/example-plugins/B2bAcl.zip | Bin .../guides/example-plugins/B2bAjaxPanel.zip | Bin .../guides/example-plugins/B2bAuditLog.zip | Bin .../guides/example-plugins/B2bAuth.zip | Bin .../guides/example-plugins/B2bLogin.zip | Bin .../guides/example-plugins/B2bRestApi.zip | Bin .../example-plugins/B2bServiceExtension.zip | Bin .../example-plugins/B2bTemplateExtension.zip | Bin .../b2b-suite/guides/example-plugins/index.md | 0 .../{ => b2b}/b2b-suite/guides/index.md | 0 .../b2b-suite/guides/installation/index.md | 0 .../guides/storefront/acl-routing.md | 0 .../b2b-suite/guides/storefront/ajax-panel.md | 0 .../b2b-suite/guides/storefront/company.md | 0 .../guides/storefront/complex-views.md | 0 .../how-to-extend-the-storefront.md | 0 .../b2b-suite/guides/storefront/index.md | 0 .../guides/storefront/modal-component.md | 0 .../guides/storefront/product-search.md | 0 .../extensions/{ => b2b}/b2b-suite/index.md | 0 products/extensions/b2b/index.md | 3 ++ .../core-reference/actions-reference.md | 8 +++++ .../core-reference/flow-reference.md | 20 +++++++++++ .../core-reference/rules-reference.md | 10 ++++++ 61 files changed, 128 insertions(+), 95 deletions(-) delete mode 100644 products/extensions/b2b-components/employee-management/concept/index.md delete mode 100644 products/extensions/b2b-components/employee-management/guides/creating-own-permissions-via-app.md delete mode 100644 products/extensions/b2b-components/employee-management/guides/index.md delete mode 100644 products/extensions/b2b-components/employee-management/index.md delete mode 100644 products/extensions/b2b-components/index.md delete mode 100644 products/extensions/b2b-suite/guides/administration/index.md rename products/extensions/{ => b2b}/b2b-components/employee-management/concept/api-route-restriction-for-employees.md (100%) rename products/extensions/{ => b2b}/b2b-components/employee-management/concept/entities-and-schema.md (100%) create mode 100644 products/extensions/b2b/b2b-components/employee-management/concept/index.md create mode 100644 products/extensions/b2b/b2b-components/employee-management/guides/b2b-employee-invite-registration.md create mode 100644 products/extensions/b2b/b2b-components/employee-management/guides/b2b-permissions/creating-own-permissions-via-app.md rename products/extensions/{b2b-components/employee-management/guides => b2b/b2b-components/employee-management/guides/b2b-permissions}/creating-own-permissions-via-plugin.md (100%) create mode 100644 products/extensions/b2b/b2b-components/employee-management/guides/b2b-permissions/index.md create mode 100644 products/extensions/b2b/b2b-components/employee-management/guides/b2b-roles.md create mode 100644 products/extensions/b2b/b2b-components/employee-management/guides/index.md create mode 100644 products/extensions/b2b/b2b-components/employee-management/index.md create mode 100644 products/extensions/b2b/b2b-components/index.md rename products/extensions/{ => b2b}/b2b-suite/concept/basic-conventions.md (100%) rename products/extensions/{ => b2b}/b2b-suite/concept/index.md (100%) rename products/extensions/{ => b2b}/b2b-suite/concept/line-item-list.md (100%) rename products/extensions/{ => b2b}/b2b-suite/concept/method-structure.md (100%) rename products/extensions/{ => b2b}/b2b-suite/concept/system-architecture.md (100%) create mode 100644 products/extensions/b2b/b2b-suite/guides/administration/index.md rename products/extensions/{ => b2b}/b2b-suite/guides/core/assignment-service.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/core/audit-log.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/core/authentication.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/core/crud-service.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/core/currency.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/core/dependency-injection.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/core/entity-acl.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/core/exception.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/core/index.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/core/listing-service.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/core/overload-classes.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/core/rest-api.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/core/store-api.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/example-plugins/B2bAcl.zip (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/example-plugins/B2bAjaxPanel.zip (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/example-plugins/B2bAuditLog.zip (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/example-plugins/B2bAuth.zip (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/example-plugins/B2bLogin.zip (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/example-plugins/B2bRestApi.zip (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/example-plugins/B2bServiceExtension.zip (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/example-plugins/B2bTemplateExtension.zip (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/example-plugins/index.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/index.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/installation/index.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/storefront/acl-routing.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/storefront/ajax-panel.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/storefront/company.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/storefront/complex-views.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/storefront/how-to-extend-the-storefront.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/storefront/index.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/storefront/modal-component.md (100%) rename products/extensions/{ => b2b}/b2b-suite/guides/storefront/product-search.md (100%) rename products/extensions/{ => b2b}/b2b-suite/index.md (100%) create mode 100644 products/extensions/b2b/index.md create mode 100644 resources/references/core-reference/actions-reference.md diff --git a/.gitbook.yaml b/.gitbook.yaml index 3247e6e17..3095b9f6a 100644 --- a/.gitbook.yaml +++ b/.gitbook.yaml @@ -18,3 +18,5 @@ redirects: resources/references/api-reference/admin-api-reference.html: guides/integrations-api/ concepts/extensions/elasticsearch-concept.html: concepts/framework/elasticsearch.html guides/plugins/plugins/storefront/use-csrf-protection.html: guides/hosting/configurations/framework/samesite-protection.html + products/extensions/b2b-suite/*: products/extensions/b2b/b2b-suite/* + products/extensions/b2b-components/*: products/extensions/b2b/b2b-components/* diff --git a/products/extensions/b2b-components/employee-management/concept/index.md b/products/extensions/b2b-components/employee-management/concept/index.md deleted file mode 100644 index 7deffa5ee..000000000 --- a/products/extensions/b2b-components/employee-management/concept/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -nav: - title: Concept - position: 10 - ---- - -# Concept - -This section covers all the general concepts related to employee management component. diff --git a/products/extensions/b2b-components/employee-management/guides/creating-own-permissions-via-app.md b/products/extensions/b2b-components/employee-management/guides/creating-own-permissions-via-app.md deleted file mode 100644 index 35fabfa4d..000000000 --- a/products/extensions/b2b-components/employee-management/guides/creating-own-permissions-via-app.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -nav: - title: Create permissions via app - position: 10 - ---- - -# Creating own permissions via app - -This article explains how to create custom permissions using an app. - -To add a new permission via an app, you need to use the app [script hook](../../../../resources/references/app-reference/script-reference/script-hooks-reference) `b2b-role-permissions` in conjunction with app scripting: - -```twig -// Resources/scripts/b2b-role-permissions/my-own-permissions.twig -{% do hook.collection.addPermission('own_entity.read', 'own_entity', []) %} -{% do hook.collection.addPermission('own_entity.edit', 'own_entity', ['own_entity.read']) %} -{% do hook.collection.addPermission('own_entity.create', 'own_entity', ['own_entity.read', 'own_entity.edit']) %} -{% do hook.collection.addPermission('own_entity.delete', 'own_entity', ['own_entity.read', 'own_entity.edit']) %} -``` - -The `PermissionCollector` collects the permissions of all app scripts and then passes them to the storefront, where they can be attached to the role by the user. -If you want to check in the template if the user has this permission, the Twig function `isB2bAllowed` can be used: - -```twig -{% sw_extends '@Storefront/storefront/page/checkout/checkout-item.html.twig' %} - -{{ parent() }} - -{% if isB2bAllowed('own_entity.read') %} -... -{% endif %} -``` diff --git a/products/extensions/b2b-components/employee-management/guides/index.md b/products/extensions/b2b-components/employee-management/guides/index.md deleted file mode 100644 index ee1aa98c3..000000000 --- a/products/extensions/b2b-components/employee-management/guides/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -nav: - title: Guides - position: 20 - ---- - -# Guides - -The following articles guide you on creating your own permissions via app or plugin for the b2b components (Employee management). diff --git a/products/extensions/b2b-components/employee-management/index.md b/products/extensions/b2b-components/employee-management/index.md deleted file mode 100644 index 4858942f6..000000000 --- a/products/extensions/b2b-components/employee-management/index.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -nav: - title: Employee management - position: 10 - ---- - -# Employee Management - -Employee management, a feature of the B2B component that includes employee, role, and permission management. It is implemented into both Storefront and Administration and supports their respective APIs. - -It allows the [business partner](#business-partner) to manage employees and their permissions as an extension to regular customer management at the company level rather than at individual level. So the employees representing the business partner company will act as customers on behalf of their company, e.g., placing orders. Accordingly, employees can make use of addresses that have been defined by the business partner for placing orders. - -The business partner has the benefit of injecting company managed data into core processes without having to develop new employee processes from scratch or maintain multiple versions of these processes. - -## Business Partner - -A business partner is an employee of the partner company who manages the employee permissions, e.g., grant permission to place orders, create addresses, apply order limit etc. Here a customer's ID associates to an employee of the business partner company. Therefore, it is really easy to rely on Shopware's typical order relevant data like addresses. This allows retaining majority of the core implementations while selectively extending a few B2B related functionalities, e.g., to reference an employee's actions (say to place order). - -## Role management - -Employees are assigned roles that define their permissions and settings. These permissions can restrict or allow employees to perform certain actions, like ordering without approval or managing roles and employees. Refer to the guides section on how permissions can be extended [via app](../employee-management/guides/creating-own-permissions-via-app) or [via plugin](../employee-management/guides/creating-own-permissions-via-plugin). diff --git a/products/extensions/b2b-components/index.md b/products/extensions/b2b-components/index.md deleted file mode 100644 index 46de2b409..000000000 --- a/products/extensions/b2b-components/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -nav: - title: B2B Components - position: 30 - ---- - -# B2B components - -B2B components are B2B features which can be activated and deactivated individually. diff --git a/products/extensions/b2b-suite/guides/administration/index.md b/products/extensions/b2b-suite/guides/administration/index.md deleted file mode 100644 index e820e7ad8..000000000 --- a/products/extensions/b2b-suite/guides/administration/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -nav: - title: Administration - position: 30 - ---- - -# Administration - -B2B Suite Administration modules are built following the official [Shopware Administration](/docs/guides/plugins/plugins/administration) documentation. For a more in-depth guide, please refer to the [User documentation](https://docs.shopware.com/en/shopware-6-en/extensions/b2b-suite-administration). diff --git a/products/extensions/b2b-components/employee-management/concept/api-route-restriction-for-employees.md b/products/extensions/b2b/b2b-components/employee-management/concept/api-route-restriction-for-employees.md similarity index 100% rename from products/extensions/b2b-components/employee-management/concept/api-route-restriction-for-employees.md rename to products/extensions/b2b/b2b-components/employee-management/concept/api-route-restriction-for-employees.md diff --git a/products/extensions/b2b-components/employee-management/concept/entities-and-schema.md b/products/extensions/b2b/b2b-components/employee-management/concept/entities-and-schema.md similarity index 100% rename from products/extensions/b2b-components/employee-management/concept/entities-and-schema.md rename to products/extensions/b2b/b2b-components/employee-management/concept/entities-and-schema.md diff --git a/products/extensions/b2b/b2b-components/employee-management/concept/index.md b/products/extensions/b2b/b2b-components/employee-management/concept/index.md new file mode 100644 index 000000000..9c4e80648 --- /dev/null +++ b/products/extensions/b2b/b2b-components/employee-management/concept/index.md @@ -0,0 +1,8 @@ +# Concept + +This section includes are the concepts related to Employee Management. + +## Additional info + +It's important to keep in mind that employees are uniquely identified via their email address. +When a new employee gets invited a check will be performed to ensure that the email address is in use only once. diff --git a/products/extensions/b2b/b2b-components/employee-management/guides/b2b-employee-invite-registration.md b/products/extensions/b2b/b2b-components/employee-management/guides/b2b-employee-invite-registration.md new file mode 100644 index 000000000..15b61e386 --- /dev/null +++ b/products/extensions/b2b/b2b-components/employee-management/guides/b2b-employee-invite-registration.md @@ -0,0 +1,5 @@ +# B2B Employee invite / registration + +Employees can be created via storefront and api to get an invite mail. This has to be later confirmed by the employee to set a password. + +It’s possible to invite new employees or manage them via the API. diff --git a/products/extensions/b2b/b2b-components/employee-management/guides/b2b-permissions/creating-own-permissions-via-app.md b/products/extensions/b2b/b2b-components/employee-management/guides/b2b-permissions/creating-own-permissions-via-app.md new file mode 100644 index 000000000..93e1a116d --- /dev/null +++ b/products/extensions/b2b/b2b-components/employee-management/guides/b2b-permissions/creating-own-permissions-via-app.md @@ -0,0 +1,11 @@ +# Create Permissions via App + +App needs to use the API to extend and create permissions. Therefore, the apps can send a request to the Store API and pass the required parameters to [`/store-api/permission`]() route. + +After doing that, the already existing permissions created by Shopware or added by plugin, will be merged with the permission created by apps. + +It is important to note that permissions have a unique name. So a permission named `employee.read` can neither be added by apps nor by plugins, because this name is already in use. So a new name can better be added by making use of snippets. + +## Snippets + +The Snippet for the new permissions have to be added to the following namespace: `b2b.role-edit.permissions.[name]`. The placeholder has to be replaced by the name of the new permission, e.g., `b2b.role-edit.permissions.order.delete`. diff --git a/products/extensions/b2b-components/employee-management/guides/creating-own-permissions-via-plugin.md b/products/extensions/b2b/b2b-components/employee-management/guides/b2b-permissions/creating-own-permissions-via-plugin.md similarity index 100% rename from products/extensions/b2b-components/employee-management/guides/creating-own-permissions-via-plugin.md rename to products/extensions/b2b/b2b-components/employee-management/guides/b2b-permissions/creating-own-permissions-via-plugin.md diff --git a/products/extensions/b2b/b2b-components/employee-management/guides/b2b-permissions/index.md b/products/extensions/b2b/b2b-components/employee-management/guides/b2b-permissions/index.md new file mode 100644 index 000000000..8220ec480 --- /dev/null +++ b/products/extensions/b2b/b2b-components/employee-management/guides/b2b-permissions/index.md @@ -0,0 +1,20 @@ +# B2B permissions + +Use permissions to restrict access to certain information or functionalities within the B2B Components. For example, the B2B supervisor can restrict which employee can manage the company's employee accounts. + +## Groups +Permissions are divided into individual groups that have a logical relationship to each other. + +## Dependencies +A permission can be dependent on another permission, without which this permission cannot be used. For example, if a role is created with the permission to edit employee accounts, this role must also have the permission to view employee accounts. This is because the `employee.edit` permission depends on the `employee.read` permission. + +## Shopware base permissions +The following permissions are already included and used in the B2B Employee Management component. More "base" permissions will be duly added with future B2B Components. + +|Group|Permission|Dependencies| +|---|---|---|---| +|employee|employee.read| | +|employee |employee.edit|employee.read| +|employee |employee.create|employee.read, employee.edit| +|employee |employee.delete|employee.read, employee.edit | +|order|order.read.all| diff --git a/products/extensions/b2b/b2b-components/employee-management/guides/b2b-roles.md b/products/extensions/b2b/b2b-components/employee-management/guides/b2b-roles.md new file mode 100644 index 000000000..51ba8596e --- /dev/null +++ b/products/extensions/b2b/b2b-components/employee-management/guides/b2b-roles.md @@ -0,0 +1,5 @@ +# B2B Roles + +Roles can be used to bind multiple permission to employees with contexts. Every employee can have one assigned role. Based on that role and the containing permission, the employee will get access to certain information and functionalities. + +The business partner has the opportunity to create a “default” role that will be selected by default, when creating a new employee. diff --git a/products/extensions/b2b/b2b-components/employee-management/guides/index.md b/products/extensions/b2b/b2b-components/employee-management/guides/index.md new file mode 100644 index 000000000..ea08f89ef --- /dev/null +++ b/products/extensions/b2b/b2b-components/employee-management/guides/index.md @@ -0,0 +1,3 @@ +# Guides + +The following articles gives you an idea of roles. Also it guides you on creating your own permissions via app or plugin for the B2B Employee Management component. diff --git a/products/extensions/b2b/b2b-components/employee-management/index.md b/products/extensions/b2b/b2b-components/employee-management/index.md new file mode 100644 index 000000000..e6e9351ba --- /dev/null +++ b/products/extensions/b2b/b2b-components/employee-management/index.md @@ -0,0 +1,17 @@ +# Employee Management + +A feature of the B2B components includes employee, role, and permission management. It is implemented into both Storefront and Administration and supports their respective APIs. + +## Basic idea + +Employee management, as one of the B2B components, is a feature that allows you to manage employees and their permissions as an extension to Shopware's account and customer management, but set into a company context. This means that employees are associated with a **company customer** and will act on behalf of that company, e.g., placing orders. Accordingly, employees can make use of addresses that have been defined by administrators of their company. + +The **company customer** has the benefit of injecting company managed data into core processes without having to develop new employee processes from scratch or maintain multiple versions of these processes. + +## Company customer + +The company customer is a regular storefront customer but with a few additional properties. A customer's ID is used to associate employees with a company. Therefore, it is really easy to rely on Shopware's typical order relevant data like addresses. This allows us to keep using most core implementations, while only extending a few B2B related features, e.g., to reference an employee's actions. + +## Role management + +Employees are assigned roles that define their permissions and settings. These permissions can restrict or allow employees to perform certain actions, like ordering without approval or managing roles and employees. Refer to our guides section how permissions can be extended [via app](../employee-management/guides/b2b-permissions/creating-own-permissions-via-app) or [via plugin](../employee-management/guides/b2b-permissions/creating-own-permissions-via-plugin). diff --git a/products/extensions/b2b/b2b-components/index.md b/products/extensions/b2b/b2b-components/index.md new file mode 100644 index 000000000..5ee6e2898 --- /dev/null +++ b/products/extensions/b2b/b2b-components/index.md @@ -0,0 +1,13 @@ +# B2B components + +The B2B Components allow merchants to selectively choose and configure B2B capabilities according to their needs. They offer merchants the ability to craft a tailored B2B ecommerce experience for their business partners while also allowing agencies to fine-tune Shopware to meet specific requirements. This means that B2B components can be individually activated or deactivated for each business partner. + +In the world of digital B2B commerce, where businesses engage with other companies, we emphasize this vital distinction through these specific features : + +* **Employee Management** enables B2B Merchants to create a buyer platform for their business partners. + +* **Quote Managements** covers Sales Representative related jobs around negotiating quotes with customers. + +* **Quick Order and Order List** takes care of distinctive B2B buying behaviors. + +* **Digital Sales Composables** aims to provide a set of composable frontends to cover more complex Sales Representative jobs. diff --git a/products/extensions/b2b-suite/concept/basic-conventions.md b/products/extensions/b2b/b2b-suite/concept/basic-conventions.md similarity index 100% rename from products/extensions/b2b-suite/concept/basic-conventions.md rename to products/extensions/b2b/b2b-suite/concept/basic-conventions.md diff --git a/products/extensions/b2b-suite/concept/index.md b/products/extensions/b2b/b2b-suite/concept/index.md similarity index 100% rename from products/extensions/b2b-suite/concept/index.md rename to products/extensions/b2b/b2b-suite/concept/index.md diff --git a/products/extensions/b2b-suite/concept/line-item-list.md b/products/extensions/b2b/b2b-suite/concept/line-item-list.md similarity index 100% rename from products/extensions/b2b-suite/concept/line-item-list.md rename to products/extensions/b2b/b2b-suite/concept/line-item-list.md diff --git a/products/extensions/b2b-suite/concept/method-structure.md b/products/extensions/b2b/b2b-suite/concept/method-structure.md similarity index 100% rename from products/extensions/b2b-suite/concept/method-structure.md rename to products/extensions/b2b/b2b-suite/concept/method-structure.md diff --git a/products/extensions/b2b-suite/concept/system-architecture.md b/products/extensions/b2b/b2b-suite/concept/system-architecture.md similarity index 100% rename from products/extensions/b2b-suite/concept/system-architecture.md rename to products/extensions/b2b/b2b-suite/concept/system-architecture.md diff --git a/products/extensions/b2b/b2b-suite/guides/administration/index.md b/products/extensions/b2b/b2b-suite/guides/administration/index.md new file mode 100644 index 000000000..81138c333 --- /dev/null +++ b/products/extensions/b2b/b2b-suite/guides/administration/index.md @@ -0,0 +1,3 @@ +# Administration + +B2B Suite Administration modules are built following the official [Shopware Administration](https://developer.shopware.com/docs/guides/plugins/plugins/administration) documentation. For a more in-depth guide, please refer to the [User documentation](https://docs.shopware.com/en/shopware-6-en/extensions/b2b-suite-administration). diff --git a/products/extensions/b2b-suite/guides/core/assignment-service.md b/products/extensions/b2b/b2b-suite/guides/core/assignment-service.md similarity index 100% rename from products/extensions/b2b-suite/guides/core/assignment-service.md rename to products/extensions/b2b/b2b-suite/guides/core/assignment-service.md diff --git a/products/extensions/b2b-suite/guides/core/audit-log.md b/products/extensions/b2b/b2b-suite/guides/core/audit-log.md similarity index 100% rename from products/extensions/b2b-suite/guides/core/audit-log.md rename to products/extensions/b2b/b2b-suite/guides/core/audit-log.md diff --git a/products/extensions/b2b-suite/guides/core/authentication.md b/products/extensions/b2b/b2b-suite/guides/core/authentication.md similarity index 100% rename from products/extensions/b2b-suite/guides/core/authentication.md rename to products/extensions/b2b/b2b-suite/guides/core/authentication.md diff --git a/products/extensions/b2b-suite/guides/core/crud-service.md b/products/extensions/b2b/b2b-suite/guides/core/crud-service.md similarity index 100% rename from products/extensions/b2b-suite/guides/core/crud-service.md rename to products/extensions/b2b/b2b-suite/guides/core/crud-service.md diff --git a/products/extensions/b2b-suite/guides/core/currency.md b/products/extensions/b2b/b2b-suite/guides/core/currency.md similarity index 100% rename from products/extensions/b2b-suite/guides/core/currency.md rename to products/extensions/b2b/b2b-suite/guides/core/currency.md diff --git a/products/extensions/b2b-suite/guides/core/dependency-injection.md b/products/extensions/b2b/b2b-suite/guides/core/dependency-injection.md similarity index 100% rename from products/extensions/b2b-suite/guides/core/dependency-injection.md rename to products/extensions/b2b/b2b-suite/guides/core/dependency-injection.md diff --git a/products/extensions/b2b-suite/guides/core/entity-acl.md b/products/extensions/b2b/b2b-suite/guides/core/entity-acl.md similarity index 100% rename from products/extensions/b2b-suite/guides/core/entity-acl.md rename to products/extensions/b2b/b2b-suite/guides/core/entity-acl.md diff --git a/products/extensions/b2b-suite/guides/core/exception.md b/products/extensions/b2b/b2b-suite/guides/core/exception.md similarity index 100% rename from products/extensions/b2b-suite/guides/core/exception.md rename to products/extensions/b2b/b2b-suite/guides/core/exception.md diff --git a/products/extensions/b2b-suite/guides/core/index.md b/products/extensions/b2b/b2b-suite/guides/core/index.md similarity index 100% rename from products/extensions/b2b-suite/guides/core/index.md rename to products/extensions/b2b/b2b-suite/guides/core/index.md diff --git a/products/extensions/b2b-suite/guides/core/listing-service.md b/products/extensions/b2b/b2b-suite/guides/core/listing-service.md similarity index 100% rename from products/extensions/b2b-suite/guides/core/listing-service.md rename to products/extensions/b2b/b2b-suite/guides/core/listing-service.md diff --git a/products/extensions/b2b-suite/guides/core/overload-classes.md b/products/extensions/b2b/b2b-suite/guides/core/overload-classes.md similarity index 100% rename from products/extensions/b2b-suite/guides/core/overload-classes.md rename to products/extensions/b2b/b2b-suite/guides/core/overload-classes.md diff --git a/products/extensions/b2b-suite/guides/core/rest-api.md b/products/extensions/b2b/b2b-suite/guides/core/rest-api.md similarity index 100% rename from products/extensions/b2b-suite/guides/core/rest-api.md rename to products/extensions/b2b/b2b-suite/guides/core/rest-api.md diff --git a/products/extensions/b2b-suite/guides/core/store-api.md b/products/extensions/b2b/b2b-suite/guides/core/store-api.md similarity index 100% rename from products/extensions/b2b-suite/guides/core/store-api.md rename to products/extensions/b2b/b2b-suite/guides/core/store-api.md diff --git a/products/extensions/b2b-suite/guides/example-plugins/B2bAcl.zip b/products/extensions/b2b/b2b-suite/guides/example-plugins/B2bAcl.zip similarity index 100% rename from products/extensions/b2b-suite/guides/example-plugins/B2bAcl.zip rename to products/extensions/b2b/b2b-suite/guides/example-plugins/B2bAcl.zip diff --git a/products/extensions/b2b-suite/guides/example-plugins/B2bAjaxPanel.zip b/products/extensions/b2b/b2b-suite/guides/example-plugins/B2bAjaxPanel.zip similarity index 100% rename from products/extensions/b2b-suite/guides/example-plugins/B2bAjaxPanel.zip rename to products/extensions/b2b/b2b-suite/guides/example-plugins/B2bAjaxPanel.zip diff --git a/products/extensions/b2b-suite/guides/example-plugins/B2bAuditLog.zip b/products/extensions/b2b/b2b-suite/guides/example-plugins/B2bAuditLog.zip similarity index 100% rename from products/extensions/b2b-suite/guides/example-plugins/B2bAuditLog.zip rename to products/extensions/b2b/b2b-suite/guides/example-plugins/B2bAuditLog.zip diff --git a/products/extensions/b2b-suite/guides/example-plugins/B2bAuth.zip b/products/extensions/b2b/b2b-suite/guides/example-plugins/B2bAuth.zip similarity index 100% rename from products/extensions/b2b-suite/guides/example-plugins/B2bAuth.zip rename to products/extensions/b2b/b2b-suite/guides/example-plugins/B2bAuth.zip diff --git a/products/extensions/b2b-suite/guides/example-plugins/B2bLogin.zip b/products/extensions/b2b/b2b-suite/guides/example-plugins/B2bLogin.zip similarity index 100% rename from products/extensions/b2b-suite/guides/example-plugins/B2bLogin.zip rename to products/extensions/b2b/b2b-suite/guides/example-plugins/B2bLogin.zip diff --git a/products/extensions/b2b-suite/guides/example-plugins/B2bRestApi.zip b/products/extensions/b2b/b2b-suite/guides/example-plugins/B2bRestApi.zip similarity index 100% rename from products/extensions/b2b-suite/guides/example-plugins/B2bRestApi.zip rename to products/extensions/b2b/b2b-suite/guides/example-plugins/B2bRestApi.zip diff --git a/products/extensions/b2b-suite/guides/example-plugins/B2bServiceExtension.zip b/products/extensions/b2b/b2b-suite/guides/example-plugins/B2bServiceExtension.zip similarity index 100% rename from products/extensions/b2b-suite/guides/example-plugins/B2bServiceExtension.zip rename to products/extensions/b2b/b2b-suite/guides/example-plugins/B2bServiceExtension.zip diff --git a/products/extensions/b2b-suite/guides/example-plugins/B2bTemplateExtension.zip b/products/extensions/b2b/b2b-suite/guides/example-plugins/B2bTemplateExtension.zip similarity index 100% rename from products/extensions/b2b-suite/guides/example-plugins/B2bTemplateExtension.zip rename to products/extensions/b2b/b2b-suite/guides/example-plugins/B2bTemplateExtension.zip diff --git a/products/extensions/b2b-suite/guides/example-plugins/index.md b/products/extensions/b2b/b2b-suite/guides/example-plugins/index.md similarity index 100% rename from products/extensions/b2b-suite/guides/example-plugins/index.md rename to products/extensions/b2b/b2b-suite/guides/example-plugins/index.md diff --git a/products/extensions/b2b-suite/guides/index.md b/products/extensions/b2b/b2b-suite/guides/index.md similarity index 100% rename from products/extensions/b2b-suite/guides/index.md rename to products/extensions/b2b/b2b-suite/guides/index.md diff --git a/products/extensions/b2b-suite/guides/installation/index.md b/products/extensions/b2b/b2b-suite/guides/installation/index.md similarity index 100% rename from products/extensions/b2b-suite/guides/installation/index.md rename to products/extensions/b2b/b2b-suite/guides/installation/index.md diff --git a/products/extensions/b2b-suite/guides/storefront/acl-routing.md b/products/extensions/b2b/b2b-suite/guides/storefront/acl-routing.md similarity index 100% rename from products/extensions/b2b-suite/guides/storefront/acl-routing.md rename to products/extensions/b2b/b2b-suite/guides/storefront/acl-routing.md diff --git a/products/extensions/b2b-suite/guides/storefront/ajax-panel.md b/products/extensions/b2b/b2b-suite/guides/storefront/ajax-panel.md similarity index 100% rename from products/extensions/b2b-suite/guides/storefront/ajax-panel.md rename to products/extensions/b2b/b2b-suite/guides/storefront/ajax-panel.md diff --git a/products/extensions/b2b-suite/guides/storefront/company.md b/products/extensions/b2b/b2b-suite/guides/storefront/company.md similarity index 100% rename from products/extensions/b2b-suite/guides/storefront/company.md rename to products/extensions/b2b/b2b-suite/guides/storefront/company.md diff --git a/products/extensions/b2b-suite/guides/storefront/complex-views.md b/products/extensions/b2b/b2b-suite/guides/storefront/complex-views.md similarity index 100% rename from products/extensions/b2b-suite/guides/storefront/complex-views.md rename to products/extensions/b2b/b2b-suite/guides/storefront/complex-views.md diff --git a/products/extensions/b2b-suite/guides/storefront/how-to-extend-the-storefront.md b/products/extensions/b2b/b2b-suite/guides/storefront/how-to-extend-the-storefront.md similarity index 100% rename from products/extensions/b2b-suite/guides/storefront/how-to-extend-the-storefront.md rename to products/extensions/b2b/b2b-suite/guides/storefront/how-to-extend-the-storefront.md diff --git a/products/extensions/b2b-suite/guides/storefront/index.md b/products/extensions/b2b/b2b-suite/guides/storefront/index.md similarity index 100% rename from products/extensions/b2b-suite/guides/storefront/index.md rename to products/extensions/b2b/b2b-suite/guides/storefront/index.md diff --git a/products/extensions/b2b-suite/guides/storefront/modal-component.md b/products/extensions/b2b/b2b-suite/guides/storefront/modal-component.md similarity index 100% rename from products/extensions/b2b-suite/guides/storefront/modal-component.md rename to products/extensions/b2b/b2b-suite/guides/storefront/modal-component.md diff --git a/products/extensions/b2b-suite/guides/storefront/product-search.md b/products/extensions/b2b/b2b-suite/guides/storefront/product-search.md similarity index 100% rename from products/extensions/b2b-suite/guides/storefront/product-search.md rename to products/extensions/b2b/b2b-suite/guides/storefront/product-search.md diff --git a/products/extensions/b2b-suite/index.md b/products/extensions/b2b/b2b-suite/index.md similarity index 100% rename from products/extensions/b2b-suite/index.md rename to products/extensions/b2b/b2b-suite/index.md diff --git a/products/extensions/b2b/index.md b/products/extensions/b2b/index.md new file mode 100644 index 000000000..ec64bbc71 --- /dev/null +++ b/products/extensions/b2b/index.md @@ -0,0 +1,3 @@ +# B2B Extension + +Unlike the B2B Suite, the B2B Components aim to provide a flexible set of B2B-related features. This enables B2B merchants to deliver the experience they want to their business partners. This is achieved by providing abilities that allow B2B Merchants to conduct basic B2B jobs and enable agencies to extend the Components according to the merchant's specific requirements. diff --git a/resources/references/core-reference/actions-reference.md b/resources/references/core-reference/actions-reference.md new file mode 100644 index 000000000..207450609 --- /dev/null +++ b/resources/references/core-reference/actions-reference.md @@ -0,0 +1,8 @@ +# Actions Reference + +## B2B + +| Class | Description | Component | +|:------------------------------------------------|:---------------------------------------------------------------|:--------------------| +| ChangeEmployeeStatusAction | Assigns the configured status to the employee | Employee Management | +| ChangeCustomerSpecificFeaturesAction | Adds or removes the configured b2b components for the customer | Employee Management | \ No newline at end of file diff --git a/resources/references/core-reference/flow-reference.md b/resources/references/core-reference/flow-reference.md index 2e1265109..55043b4f4 100644 --- a/resources/references/core-reference/flow-reference.md +++ b/resources/references/core-reference/flow-reference.md @@ -81,3 +81,23 @@ nav: | state_leave.order.state.cancelled | Triggers when an order leaves status "Cancelled" | Add/remove tag, send mail, generate document, set order status | | state_enter.order_transaction.state.unconfirmed | Triggers when an order payment enters status "Unconfirmed" | Add/remove tag, send mail, generate document, set order status | | state_leave.order_transaction.state.unconfirmed | Triggers when an order payment leaves status "Unconfirmed" | Add/remove tag, send mail, generate document, set order status | + +## B2B + +### Trigger interfaces + +| Name | Provided | +|:--------------|:-----------| +| EmployeeAware | employeeId | + +### Events + +| Class | Description | Component | +|:--------------------------|:-------------------------------------------------------|:--------------------| +| collect.permission-events | Triggers when base permissions are created | Employee Management | +| employee.invite.sent | Triggers when an employee invitation has been sent | Employee Management | +| employee.invite.accepted | Triggers when an employee invitation has been accepted | Employee Management | +| employee.recovery.request | Triggers when an employee requests password recovery | Employee Management | +| employee.status.changed | Triggers when the status of an employee changes | Employee Management | +| employee.role.changed | Triggers when the role of an employee changes | Employee Management | +| employee.order.placed | Triggers when an employee places an order | Employee Management | diff --git a/resources/references/core-reference/rules-reference.md b/resources/references/core-reference/rules-reference.md index a522dd446..f0f6f66d7 100644 --- a/resources/references/core-reference/rules-reference.md +++ b/resources/references/core-reference/rules-reference.md @@ -81,3 +81,13 @@ List of all rule classes across Shopware 6. | Class | Description | | :--- | :--- | | [Shopware\Core\System\Currency\Rule\CurrencyRule](https://github.com/shopware/shopware/blob/trunk/src/Core/System/Currency/Rule/CurrencyRule.php) | Match a specific currency to the current context. | + +## B2B + +| Class | Description | Component | +|:------------------------------|:----------------------------------------------------------------------|:--------------------| +| EmployeeOrderRule | Matches if the order was placed by an employee | Employee Management | +| EmployeeOfBusinessPartnerRule | Matches if the customer is an employee of a specific business partner | Employee Management | +| EmployeeRoleRule | Matches if a specific role is assigned to an employee | Employee Management | +| EmployeeStatusRule | Matches if the employee as a specific status | Employee Management | +| IsEmployeeRule | Matches if the customer is an employee | Employee Management |