fond-of-oryx / erp-order-page-search
ERP Order Page Search module
Installs: 1 909
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=8.0
- fond-of-oryx/erp-order: ^4.4.0
- fond-of-oryx/erp-order-page-search-extension: ^1.0.0
- fond-of-oryx/erp-order-permission: ^1.0.0 || ^2.0.0
- spryker/customer: ^7.0.0
- spryker/event-behavior: ^1.0.0
- spryker/publisher-extension: ^1.0.0
- spryker/search: ^8.0.0
- spryker/search-elasticsearch: ^1.0.0
- spryker/synchronization: ^1.0.0
- spryker/synchronization-behavior: ^1.0.0
- spryker/synchronization-extension: ^1.1.0
Requires (Dev)
README
Installation
composer require fond-of-oryx/erp-order-page-search
Configuration
For searches like GET {{glue_uri}}/erp-order-page-search?page[offset]=0&page[limit]=12&company-business-unit-uuid[]={{external_company_business_unit_reference}}&external-reference[]={{external_reference1}}&external-reference[]={{external_reference2}}
Register ErpOrderPageSearchOwnParamFilterQueryExpanderPlugin
as expander plugin
For searches with spryker filters like GET {{glue_uri}}/erp-order-page-search?page[offset]=0&page[limit]=12&filter[company-business-unit.uuid]={{external_company_business_unit_reference}}&filter[erp-order.external-reference]={{external_reference}}
Register ErpOrderPageSearchExternalReferenceFilterQueryExpanderPlugin
as expander plugin
and ErpOrderPageSearchCompanyBusinessUnitUuidFilterQueryExpanderPlugin
as expander plugin
Register RawErpOrderPageSearchResultFormatterPlugin
as result formatter plugin
<?php
namespace Pyz\Client\ErpOrderPageSearch;
use FondOfOryx\Client\ErpOrderPageSearch\ErpOrderPageSearchDependencyProvider as FooErpOrderPageSearchDependencyProvider;
use FondOfOryx\Client\ErpOrderPageSearch\Plugin\SearchExtension\ErpOrderPageSearchOwnParamFilterQueryExpanderPlugin;
use FondOfOryx\Client\ErpOrderPageSearch\Plugin\SearchExtension\RawErpOrderPageSearchResultFormatterPlugin;
class ErpOrderPageSearchDependencyProvider extends FooErpOrderPageSearchDependencyProvider
{
/**
* @return \Spryker\Client\Search\Dependency\Plugin\QueryExpanderPluginInterface[]
*/
protected function getQueryExpanderPlugins(): array
{
$queryExpanderPlugins = parent::getQueryExpanderPlugins();
$queryExpanderPlugins[] = new ErpOrderPageSearchOwnParamFilterQueryExpanderPlugin();
return $queryExpanderPlugins;
}
/**
* @return \Spryker\Client\Search\Dependency\Plugin\ResultFormatterPluginInterface[]
*/
protected function getResultFormatterPlugins(): array
{
$resultFormatterPlugins = parent::getResultFormatterPlugins();
$resultFormatterPlugins[] = new RawErpOrderPageSearchResultFormatterPlugin();
return $resultFormatterPlugins;
}
}