Install the Spryker Core Back Office + Warehouse User Management feature
Edit on GitHubThis document describes how to install the Spryker Core Back Office + Warehouse User Management feature.
Install feature core
Follow the steps below to install the Picking App feature API.
Prerequisites
To start feature integration, integrate the required features and Glue APIs:
NAME | VERSION | INSTALLATION GUIDE |
---|---|---|
Spryker Core Back Office | 202410.0 | Install the Spryker Core Back Office feature |
Warehouse User Management | 202410.0 | Install the Warehouse User Management feature |
1) Set up behavior
Enable the following behaviors by registering the plugins:
PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE |
---|---|---|---|
UserByWarehouseUserAssignmentResourceRelationshipPlugin | Adds the users resource as a relationship to the warehouse-user-assignments resource. |
Spryker\Glue\UsersBackendApi\Plugin\GlueJsonApiConvention |
src/Pyz/Glue/GlueBackendApiApplicationGlueJsonApiConventionConnector/GlueBackendApiApplicationGlueJsonApiConventionConnectorDependencyProvider.php
<?php
namespace Pyz\Glue\GlueBackendApiApplicationGlueJsonApiConventionConnector;
use Spryker\Glue\GlueBackendApiApplicationGlueJsonApiConventionConnector\GlueBackendApiApplicationGlueJsonApiConventionConnectorDependencyProvider as SprykerGlueBackendApiApplicationGlueJsonApiConventionConnectorDependencyProvider;
use Spryker\Glue\GlueJsonApiConventionExtension\Dependency\Plugin\ResourceRelationshipCollectionInterface;
use Spryker\Glue\UsersBackendApi\Plugin\GlueBackendApiApplicationGlueJsonApiConventionConnector\UserByWarehouseUserAssignmentBackendResourceRelationshipPlugin;
use Spryker\Glue\WarehouseUsersBackendApi\WarehouseUsersBackendApiConfig;
class GlueBackendApiApplicationGlueJsonApiConventionConnectorDependencyProvider extends SprykerGlueBackendApiApplicationGlueJsonApiConventionConnectorDependencyProvider
{
/**
* @param \Spryker\Glue\GlueJsonApiConventionExtension\Dependency\Plugin\ResourceRelationshipCollectionInterface $resourceRelationshipCollection
*
* @return \Spryker\Glue\GlueJsonApiConventionExtension\Dependency\Plugin\ResourceRelationshipCollectionInterface
*/
protected function getResourceRelationshipPlugins(
ResourceRelationshipCollectionInterface $resourceRelationshipCollection,
): ResourceRelationshipCollectionInterface {
$resourceRelationshipCollection->addRelationship(
WarehouseUsersBackendApiConfig::RESOURCE_TYPE_WAREHOUSE_USER_ASSIGNMENTS,
new UserByWarehouseUserAssignmentBackendResourceRelationshipPlugin(),
);
return $resourceRelationshipCollection;
}
}
Verification
Make sure that when the users
resource is included as a query string, the warehouse-user-assignments
resource returns it as a relationship: https://glue-backend.mysprykershop.com/warehouse-user-assignments?include=users
.
Thank you!
For submitting the form