diff --git a/README.md b/README.md index fe42fca..69fbfab 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,5 @@ # spryker-product-page-search-expander -[![PHP from Travis config](https://img.shields.io/travis/php-v/symfony/symfony.svg)](https://php.net/) -[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://packagist.org/packages/fond-of-spryker/product-page-search-expander) - ## Installation ``` diff --git a/src/FondOfSpryker/Shared/ProductPageSearchExpander/ProductPageSearchExpanderConstants.php b/src/FondOfSpryker/Shared/ProductPageSearchExpander/ProductPageSearchExpanderConstants.php index c53632c..4e6b699 100644 --- a/src/FondOfSpryker/Shared/ProductPageSearchExpander/ProductPageSearchExpanderConstants.php +++ b/src/FondOfSpryker/Shared/ProductPageSearchExpander/ProductPageSearchExpanderConstants.php @@ -14,6 +14,8 @@ interface ProductPageSearchExpanderConstants public const SIZE = 'size'; + public const STYLE_UNIQUE = 'style_unique'; + public const STYLE_KEY = 'style_key'; public const AVAILABLE = 'available'; diff --git a/src/FondOfSpryker/Zed/ProductPageSearchExpander/Communication/Plugin/ProductPageSearch/Elasticsearch/ProductAbstractMap/StyleUniqueMapExpanderPlugin.php b/src/FondOfSpryker/Zed/ProductPageSearchExpander/Communication/Plugin/ProductPageSearch/Elasticsearch/ProductAbstractMap/StyleUniqueMapExpanderPlugin.php new file mode 100644 index 0000000..3c4953f --- /dev/null +++ b/src/FondOfSpryker/Zed/ProductPageSearchExpander/Communication/Plugin/ProductPageSearch/Elasticsearch/ProductAbstractMap/StyleUniqueMapExpanderPlugin.php @@ -0,0 +1,42 @@ +setStyleKey($productData[ProductPageSearchExpanderConstants::STYLE_UNIQUE]); + } + + return $pageMapTransfer; + } +} diff --git a/src/FondOfSpryker/Zed/ProductPageSearchExpander/Communication/Plugin/ProductPageSearch/Elasticsearch/ProductPageData/StyleUniqueDataExpanderPlugin.php b/src/FondOfSpryker/Zed/ProductPageSearchExpander/Communication/Plugin/ProductPageSearch/Elasticsearch/ProductPageData/StyleUniqueDataExpanderPlugin.php new file mode 100644 index 0000000..51307ad --- /dev/null +++ b/src/FondOfSpryker/Zed/ProductPageSearchExpander/Communication/Plugin/ProductPageSearch/Elasticsearch/ProductPageData/StyleUniqueDataExpanderPlugin.php @@ -0,0 +1,40 @@ +setStyleKey($productAttributes[ProductPageSearchExpanderConstants::STYLE_UNIQUE]); + } + } +}