Install the Comments + Merchant B2B Contracts feature
Edit on GitHubThis document describes how to install the Comments + Merchant B2B Contracts feature.
Prerequisites
Install the required features:
NAME | VERSION | INSTALLATION GUIDE |
---|---|---|
Comments | 202404.0 | Install the Comments feature |
Merchant B2B Contracts | 202404.0 | Install the Merchant B2B Contracts feature |
1) Install the required modules
Install the required modules using Composer:
composer require spryker/comment-merchant-relationship-connector: "^1.0.0" --update-with-dependencies
Make sure the following modules have been installed:
MODULE | EXPECTED DIRECTORY |
---|---|
CommentMerchantRelationshipConnector | vendor/spryker/comment-merchant-relationship-connector |
2) Set up transfer objects
Generate transfer changes:
console transfer:generate
Make sure the following changes have been applied in transfer objects:
Transfer | Type | Event | Path |
---|---|---|---|
MerchantRelationship.commentThread | property | created | src/Generated/Shared/Transfer/MerchantRelationshipTransfer |
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
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(),
];
}
}
-
In the Back Office, go to Marketplace > Merchant Relations
-
Click Edit next to any merchant relation. Make sure you can see, add, edit, and delete comments.
-
In the Merchant Portal, go to B2B Contracts > Merchant Relations
-
Select a merchant relation. Make sure you can see, add, edit, and delete comments.
Thank you!
For submitting the form