Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CC-32421 Add integration guides for Merchant B2B Contracts and Merchant B2B Contract Requests features #2563

Merged
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
dbdfe43
CC-32421 Add integration guides for Merchant B2B Contracts and Mercha…
AsonUnique Mar 13, 2024
6d8c2b6
CC-32421 Add IG docs
AsonUnique Mar 13, 2024
83f9d7c
CC-32421 Add missing config
AsonUnique Mar 14, 2024
056ebcb
CC-32421 Update glossary keys
AsonUnique Mar 18, 2024
6f241d3
CC-32421 Update guides after recent changes
AsonUnique Mar 25, 2024
98b2154
CC-32421 Add new email templates
AsonUnique Mar 25, 2024
365de0b
CC-32421: Added fixes after the review.
abitskil Mar 25, 2024
bba5726
Update install-the-comments-feature.md
andriitserkovnyi Mar 26, 2024
53788f1
Update install-the-comments-feature.md
andriitserkovnyi Mar 26, 2024
26d0b26
Update install-the-comments-feature.md
andriitserkovnyi Mar 26, 2024
084bd15
Update install-the-comments-feature.md
andriitserkovnyi Mar 26, 2024
ab4b7ce
Update install-the-comments-feature.md
andriitserkovnyi Mar 26, 2024
13a31d0
Merge branch 'master' into feature/cc-32421-merchant-relation-request…
andriitserkovnyi Mar 26, 2024
854dbd2
Update install-the-comments-merchant-b2b-contract-requests-feature.md
andriitserkovnyi Mar 26, 2024
39833fe
Update install-the-comments-merchant-b2b-contract-requests-feature.md
andriitserkovnyi Mar 26, 2024
cd07bc1
Update install-the-comments-merchant-b2b-contract-requests-feature.md
andriitserkovnyi Mar 26, 2024
0744daf
Update install-the-comments-merchant-b2b-contracts-feature.md
andriitserkovnyi Mar 26, 2024
b3febe8
Update install-the-comments-spryker-core-back-office-feature.md
andriitserkovnyi Mar 26, 2024
8e87c06
review
andriitserkovnyi Mar 26, 2024
3725ea1
Update install-the-merchant-b2b-contract-requests-feature.md
andriitserkovnyi Mar 26, 2024
42e740a
Update install-the-merchant-b2b-contract-requests-feature.md
andriitserkovnyi Mar 26, 2024
f29f475
Merge branch 'master' into feature/cc-32421-merchant-relation-request…
andriitserkovnyi Mar 27, 2024
839b757
review
andriitserkovnyi Mar 27, 2024
a3d6ff6
Update install-the-merchant-b2b-contracts-feature.md
andriitserkovnyi Mar 27, 2024
2616b4c
Update install-the-merchant-b2b-contracts-feature.md
andriitserkovnyi Mar 27, 2024
54ee9fa
Update install-the-merchant-b2b-contracts-feature.md
andriitserkovnyi Mar 27, 2024
7d6bc05
Merge branch 'master' into feature/cc-32421-merchant-relation-request…
andriitserkovnyi Mar 27, 2024
325be5c
Update install-the-merchant-b2b-contract-requests-feature.md
andriitserkovnyi Mar 27, 2024
07b8bdf
Merge branch 'master' into feature/cc-32421-merchant-relation-request…
andriitserkovnyi Mar 28, 2024
826147e
Update install-the-marketplace-merchant-portal-core-feature.md
andriitserkovnyi Mar 28, 2024
2ead0e4
review
andriitserkovnyi Mar 28, 2024
1e57362
Update install-the-marketplace-merchant-b2b-contract-requests-feature.md
andriitserkovnyi Mar 28, 2024
c4bbe86
review
andriitserkovnyi Mar 28, 2024
81fd251
Update email-as-a-cms-block-overview.md
andriitserkovnyi Mar 28, 2024
8944507
fix breadcrumbs part
supproduction Mar 28, 2024
fd7fea6
CC-32421: Added fixes after the TW review.
abitskil Mar 28, 2024
816468b
fe-tw–review
andriitserkovnyi Mar 28, 2024
c5430d2
Update install-the-comments-feature.md
andriitserkovnyi Mar 28, 2024
d18f777
Update install-the-comments-feature.md
andriitserkovnyi Mar 28, 2024
7f53fe7
CC-32421: Added fixes after the TW review.
abitskil Mar 28, 2024
8247cb7
Update install-the-merchant-b2b-contracts-feature.md
andriitserkovnyi Mar 28, 2024
f99759b
CC-32421: Added fixes after the TW review.
abitskil Mar 28, 2024
c04f8f3
comments
andriitserkovnyi Mar 29, 2024
9e4ac99
Update install-the-merchant-b2b-contract-requests-feature.md
andriitserkovnyi Mar 29, 2024
ec4ae20
Update install-the-merchant-b2b-contracts-feature.md
andriitserkovnyi Mar 29, 2024
044fa96
Merge branch 'master' into feature/cc-32421-merchant-relation-request…
andriitserkovnyi Mar 29, 2024
aba840a
spread igs
andriitserkovnyi Mar 29, 2024
568d77a
sidebar
andriitserkovnyi Mar 29, 2024
3c78b40
Merge branch 'master' into feature/cc-32421-merchant-relation-request…
andriitserkovnyi Mar 29, 2024
22c31bb
links
andriitserkovnyi Mar 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
This document describes how to install the Comments + Merchant B2B Contract Requests feature.

## Install feature core

Follow the steps below to install the Comments + Merchant B2B Contract Requests feature core.

## Prerequisites

Install the required features:

| NAME | VERSION | INSTALLATION GUIDE |
|--------------------------------|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Comments | {{page.version}} | [Install the Comments feature](/docs/pbc/all/cart-and-checkout/{{page.version}}/base-shop/install-and-upgrade/install-features/install-the-comments-feature.html) |
| Merchant B2B Contract Requests | {{page.version}} | [Install the Merchant B2B Contract Requests feature](/docs/pbc/all/merchant-management/{{page.version}}/base-shop/install-and-upgrade/install-the-merchant-b2b-contract-requests-feature.html) |

### 1) Install the required modules

Install the required modules using Composer:

```bash
composer require spryker/comment-merchant-relation-request-connector: "^1.0.0" --update-with-dependencies
```

{% info_block warningBox "Verification" %}

Make sure the following modules have been installed:

| MODULE | EXPECTED DIRECTORY |
|-----------------------------------------|------------------------------------------------------------|
| CommentMerchantRelationRequestConnector | vendor/spryker/comment-merchant-relation-request-connector |

{% endinfo_block %}

### 2) Set up transfer objects

Generate transfer changes:

```bash
console transfer:generate
```

{% info_block warningBox "Verification" %}

Make sure the following changes have been applied in transfer objects:

| Transfer | Type | Event | Path |
|---------------------------------------|----------|---------|---------------------------------------------------------------|
| MerchantRelationRequest.commentThread | property | created | src/Generated/Shared/Transfer/MerchantRelationRequestTransfer |
| MerchantRelationship.commentThread | property | created | src/Generated/Shared/Transfer/MerchantRelationshipTransfer |

{% endinfo_block %}

### 3) Set up behavior

Enable the following behaviors by registering the plugins:

| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE |
|---------------------------------------------------------|----------------------------------------------------------------------------------------|---------------|--------------------------------------------------------------------------------------------------|
| CommentThreadMerchantRelationRequestExpanderPlugin | Populates `MerchantRelationRequestTransfer.commentThread` with a related comment thread. | | Spryker\Zed\CommentMerchantRelationRequestConnector\Communication\Plugin\MerchantRelationRequest |
| CopyCommentThreadToMerchantRelationshipPostCreatePlugin | Copies a comment thread from a merchant relation request to a merchant relationship. | | Spryker\Zed\CommentMerchantRelationRequestConnector\Communication\Plugin\MerchantRelationship |

**src/Pyz/Zed/MerchantRelationRequest/MerchantRelationRequestDependencyProvider.php**

```php
<?php

namespace Pyz\Zed\MerchantRelationRequest;

use Spryker\Zed\CommentMerchantRelationRequestConnector\Communication\Plugin\MerchantRelationRequest\CommentThreadMerchantRelationRequestExpanderPlugin;
use Spryker\Zed\MerchantRelationRequest\MerchantRelationRequestDependencyProvider as SprykerMerchantRelationRequestDependencyProvider;

class MerchantRelationRequestDependencyProvider extends SprykerMerchantRelationRequestDependencyProvider
{
/**
* @return list<\Spryker\Zed\MerchantRelationRequestExtension\Dependency\Plugin\MerchantRelationRequestExpanderPluginInterface>
*/
protected function getMerchantRelationRequestExpanderPlugins(): array
{
return [
new CommentThreadMerchantRelationRequestExpanderPlugin(),
];
}
}
```

{% info_block warningBox "Verification" %}

1. In the Merchant Portal, go to **B2B Contracts** > **Merchant Relation Requests**
2. Select a merchant relation request.
Make sure you can see, add, edit and delete comments.

{% endinfo_block %}

**src/Pyz/Zed/MerchantRelationship/MerchantRelationshipDependencyProvider.php**

```php
<?php

namespace Pyz\Zed\MerchantRelationship;

use Spryker\Zed\CommentMerchantRelationRequestConnector\Communication\Plugin\MerchantRelationship\CopyCommentThreadToMerchantRelationshipPostCreatePlugin;
use Spryker\Zed\MerchantRelationship\MerchantRelationshipDependencyProvider as SprykerMerchantRelationshipDependencyProvider;

class MerchantRelationshipDependencyProvider extends SprykerMerchantRelationshipDependencyProvider
{
/**
* @return array<\Spryker\Zed\MerchantRelationshipExtension\Dependency\Plugin\MerchantRelationshipPostCreatePluginInterface>
*/
protected function getMerchantRelationshipPostCreatePlugins(): array
{
return [
new CopyCommentThreadToMerchantRelationshipPostCreatePlugin(),
];
}
}
```

{% info_block warningBox "Verification" %}

1. In the Merchant Portal, go to **B2B Contracts** > **Merchant Relation Requests**.
2. Select a pending merchant relation request.
3. Add some comments.
4. Approve the merchant relation request.
5. Go to **B2B Contracts** > **Merchant Relations** and select the merchant relation you've created.
Make sure you can see the comments copied from the merchant relation request.

{% endinfo_block %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
This document describes how to install the Comments + Merchant B2B Contracts feature.

## Prerequisites

Install the required features:

| NAME | VERSION | INSTALLATION GUIDE |
|-------------------------------------|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Comments | {{page.version}} | [Install the Comments feature](/docs/pbc/all/cart-and-checkout/{{page.version}}/base-shop/install-and-upgrade/install-features/install-the-comments-feature.html) |
| Merchant B2B Contracts | {{page.version}} | [Install the Merchant B2B Contracts feature](/docs/pbc/all/merchant-management/{{page.version}}/base-shop/install-and-upgrade/install-the-merchant-b2b-contracts-feature.html) |

## 1) Install the required modules

Install the required modules using Composer:

```bash
composer require spryker/comment-merchant-relationship-connector: "^1.0.0" --update-with-dependencies
```

{% info_block warningBox "Verification" %}

Make sure the following modules have been installed:

| MODULE | EXPECTED DIRECTORY |
|--------------------------------------|--------------------------------------------------------|
| CommentMerchantRelationshipConnector | vendor/spryker/comment-merchant-relationship-connector |

{% endinfo_block %}

## 2) Set up transfer objects

Generate transfer changes:

```bash
console transfer:generate
```

{% info_block warningBox "Verification" %}

Make sure the following changes have been applied in transfer objects:

| Transfer | Type | Event | Path |
|------------------------------------|----------|---------|------------------------------------------------------------|
| MerchantRelationship.commentThread | property | created | src/Generated/Shared/Transfer/MerchantRelationshipTransfer |

{% endinfo_block %}

## 3) Set up behavior

Enable the following behaviors by registering the plugins:

| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE |
|-------------------------------------------------|-------------------------------------------------------------------------------------|---------------|--------------------------------------------------------------------------------------------|
| CommentThreadMerchantRelationshipExpanderPlugin | Populates `MerchantRelationshipTransfer.commentThread` with a related comment thread. | | Spryker\Zed\CommentMerchantRelationshipConnector\Communication\Plugin\MerchantRelationship |

**src/Pyz/Zed/MerchantRelationship/MerchantRelationshipDependencyProvider.php**

```php
<?php

namespace Pyz\Zed\MerchantRelationship;

use Spryker\Zed\CommentMerchantRelationshipConnector\Communication\Plugin\MerchantRelationship\CommentThreadMerchantRelationshipExpanderPlugin;
use Spryker\Zed\MerchantRelationship\MerchantRelationshipDependencyProvider as SprykerMerchantRelationshipDependencyProvider;

class MerchantRelationshipDependencyProvider extends SprykerMerchantRelationshipDependencyProvider
{
/**
* @return array<\Spryker\Zed\MerchantRelationshipExtension\Dependency\Plugin\MerchantRelationshipExpanderPluginInterface>
*/
protected function getMerchantRelationshipExpanderPlugins(): array
{
return [
new CommentThreadMerchantRelationshipExpanderPlugin(),
];
}
}
```

{% info_block warningBox "Verification" %}

1. In the Back Office, go to **Marketplace** > **Merchant Relations**
2. Click **Edit** next to any merchant relation.
Make sure you can see, add, edit, and delete comments.

1. In the Merchant Portal, go to **B2B Contracts** > **Merchant Relations**
2. Select a merchant relation.
Make sure you can see, add, edit, and delete comments.

{% endinfo_block %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
This document describes how to install the Comments + Spryker Core Back Office feature.

## Prerequisites

Install the required features:

| NAME | VERSION | INSTALLATION GUIDE |
|--------------------------|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Comments | {{page.version}} | [Install the Comments feature](/docs/pbc/all/cart-and-checkout/{{page.version}}/base-shop/install-and-upgrade/install-features/install-the-comments-feature.html) |
| Spryker Core Back Office | {{page.version}} | [Install the Spryker Core Back Office feature](/docs/scos/dev/feature-integration-guides/{{page.version}}/spryker-core-back-office-feature-integration.html) |

## 1) Install the required modules

Install the required modules using Composer:

```bash
composer require spryker/comment-user-connector: "^1.0.0" --update-with-dependencies
```

{% info_block warningBox "Verification" %}

Make sure the following modules have been installed:

| MODULE | EXPECTED DIRECTORY |
|--------------------------------|--------------------------------------------------|
| CommentUserConnector | vendor/spryker/comment-user-connector |

{% endinfo_block %}

### 3) Set up database schema and transfer objects

Apply database changes and generate entity and transfer changes:

```bash
console propel:install
console transfer:generate
```

{% info_block warningBox "Verification" %}

Make sure the following changes have been applied in the database:

| DATABASE ENTITY | TYPE | EVENT |
|---------------------|--------|---------|
| spy_comment.fk_user | column | created |

{% endinfo_block %}

{% info_block warningBox "Verification" %}

Make sure the following changes have been applied in transfer objects:

| Transfer | Type | Event | Path |
|----------------|----------|---------|-----------------------------------------------|
| Comment.fkUser | property | created | src/Generated/Shared/Transfer/CommentTransfer |
| Comment.user | property | created | src/Generated/Shared/Transfer/CommentTransfer |

{% endinfo_block %}

### 3) Set up behavior

Enable the following behaviors by registering the plugins:

| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE |
|-------------------------------------------|-----------------------------------------------------------------------------------|---------------|---------------------------------------------------------------|
| UserCommentAuthorValidationStrategyPlugin | Validates a comment author when `CommentTransfer.fkUser` is provided. | | Spryker\Zed\CommentUserConnector\Communication\Plugin\Comment |
| UserCommentExpanderPlugin | Expands `CommentTransfer` with `UserTransfer` if `CommentTransfer.fkUser` is set. | | Spryker\Zed\CommentUserConnector\Communication\Plugin\Comment |

**src/Pyz/Zed/Comment/CommentDependencyProvider.php**

```php
<?php

namespace Pyz\Zed\Comment;

use Spryker\Zed\Comment\CommentDependencyProvider as SprykerCommentDependencyProvider;
use Spryker\Zed\CommentUserConnector\Communication\Plugin\Comment\UserCommentAuthorValidationStrategyPlugin;
use Spryker\Zed\CommentUserConnector\Communication\Plugin\Comment\UserCommentExpanderPlugin;

class CommentDependencyProvider extends SprykerCommentDependencyProvider
{
/**
* @return list<\Spryker\Zed\CommentExtension\Dependency\Plugin\CommentAuthorValidatorStrategyPluginInterface>
*/
protected function getCommentAuthorValidatorStrategyPlugins(): array
{
return [
new UserCommentAuthorValidationStrategyPlugin(),
];
}

/**
* @return list<\Spryker\Zed\CommentExtension\Dependency\Plugin\CommentExpanderPluginInterface>
*/
protected function getCommentExpanderPlugins(): array
{
return [
new UserCommentExpanderPlugin(),
];
}
}
```

{% info_block warningBox "Verification" %}

1. In the Back Office, go to **Marketplace** > **Merchant Relations**.
2. Click **Edit** next to a merchant relation.
3. Write a comment and click **Save**.
Make sure the user's information is displayed under the saved comment.



{% endinfo_block %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
This document describes how to install the Company Account + Merchant B2B Contract Requests feature.

## Prerequisites

Install the required features:

| NAME | VERSION | INSTALLATION GUIDE |
|--------------------------------|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Company Account | {{page.version}} | [Install the Company Account feature](/docs/pbc/all/customer-relationship-management/{{page.version}}/base-shop/install-and-upgrade/install-features/install-the-company-account-feature.html) |
| Merchant B2B Contract Requests | {{page.version}} | [Install the Merchant B2B Contract Requests feature](/docs/pbc/all/merchant-management/{{page.version}}/base-shop/install-and-upgrade/install-the-merchant-b2b-contract-requests-feature.html) |

## 1) Set up behavior

Enable the following behaviors by registering the plugins:

| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE |
|-------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|---------------|-----------------------------------------------------------------------------|
| AssigneeCompanyBusinessUnitAddressMerchantRelationRequestExpanderPlugin | Expands `MerchantRelationRequestCollectionTransfer` with an assignee company business unit addresses. | | Spryker\Zed\CompanyUnitAddress\Communication\Plugin\MerchantRelationRequest |

**src/Pyz/Zed/MerchantRelationRequest/MerchantRelationRequestDependencyProvider.php**

```php
<?php

namespace Pyz\Zed\MerchantRelationRequest;

use Spryker\Zed\CompanyUnitAddress\Communication\Plugin\MerchantRelationRequest\AssigneeCompanyBusinessUnitAddressMerchantRelationRequestExpanderPlugin;
use Spryker\Zed\MerchantRelationRequest\MerchantRelationRequestDependencyProvider as SprykerMerchantRelationRequestDependencyProvider;

class MerchantRelationRequestDependencyProvider extends SprykerMerchantRelationRequestDependencyProvider
{
/**
* @return list<\Spryker\Zed\MerchantRelationRequestExtension\Dependency\Plugin\MerchantRelationRequestExpanderPluginInterface>
*/
protected function getMerchantRelationRequestExpanderPlugins(): array
{
return [
new AssigneeCompanyBusinessUnitAddressMerchantRelationRequestExpanderPlugin(),
];
}
}
```

{% info_block warningBox "Verification" %}


1. In the Merchant Portal, go to **B2B Contracts** > **Merchant Relation Requests**.
2. Select a merchant relation request.
Make sure that, in the **Company Details** section, business units with their names and addresses are displayed.

{% endinfo_block %}
Loading
Loading