Skip to content

Commit

Permalink
Merge pull request #65 from PrestaShop/dev
Browse files Browse the repository at this point in the history
Release v3.0.1
  • Loading branch information
Quetzacoalt91 authored May 21, 2019
2 parents 41cbc9f + 07050c6 commit 9a531f7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
4 changes: 2 additions & 2 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<module>
<name>ps_facetedsearch</name>
<displayName><![CDATA[Faceted search]]></displayName>
<version><![CDATA[3.0.0]]></version>
<version><![CDATA[3.0.1]]></version>
<description><![CDATA[Displays a block allowing multiple filters.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>
</module>
2 changes: 1 addition & 1 deletion ps_facetedsearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function __construct()
{
$this->name = 'ps_facetedsearch';
$this->tab = 'front_office_features';
$this->version = '3.0.0';
$this->version = '3.0.1';
$this->author = 'PrestaShop';
$this->need_instance = 0;
$this->bootstrap = true;
Expand Down
3 changes: 3 additions & 0 deletions src/Product/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ public function initSearch($selectedFilters)
$this->addFilter('id_category_default', [$parent->id]);
}

// Visibility of a product must be in catalog or both (search & catalog)
$this->addFilter('visibility', ['both', 'catalog']);

$this->addSearchFilters(
$selectedFilters,
$psLayeredFullTree ? $parent : null,
Expand Down
16 changes: 16 additions & 0 deletions tests/php/FacetedSearch/Product/SearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ public function testInitSearchWithEmptyFilters()
],
],
],
'visibility' => [
'=' => [
[
'both',
'catalog',
],
],
],
],
$this->search->getSearchAdapter()->getInitialPopulation()->getFilters()->toArray()
);
Expand Down Expand Up @@ -235,6 +243,14 @@ public function testInitSearchWithAllFilters()
],
],
],
'visibility' => [
'=' => [
[
'both',
'catalog',
],
],
],
],
$this->search->getSearchAdapter()->getInitialPopulation()->getFilters()->toArray()
);
Expand Down

0 comments on commit 9a531f7

Please sign in to comment.