Skip to content

Commit 0757549

Browse files
authored
Develop to master (#1166)
1 parent f905c1f commit 0757549

File tree

76 files changed

+252
-2038
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+252
-2038
lines changed

.circleci/config.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,18 @@ shared: &shared
4141
name: Before setup
4242
command: |
4343
echo 'memory_limit = 256M' | sudo tee /usr/local/etc/php/php.ini
44-
wget https://alg.li/algolia-keys && chmod +x algolia-keys
44+
45+
- run:
46+
name: Get keys from dealer
47+
command: |
48+
if [ "$CIRCLE_PR_REPONAME" ]; then
49+
curl -s https://algoliasearch-client-keygen.herokuapp.com | sh >> $BASH_ENV
50+
fi
4551
4652
- run:
4753
name: Run tests
4854
command: |
4955
cd ~/magento_directory/dev/tests/integration
50-
export CI_BUILD_NUM=$CIRCLE_BUILD_NUM
51-
export CI_PROJ_USERNAME=$CIRCLE_PROJECT_USERNAME
52-
export CI_PROJ_REPONAME=$CIRCLE_PROJECT_REPONAME
53-
eval $(~/build_directory/algoliasearch-magento-2/algolia-keys export)
5456
sudo service elasticsearch start # for some reasons has to be launched with the step
5557
sleep 10
5658
php -dmemory_limit=-1 ../../../vendor/bin/phpunit --debug ../../../vendor/algolia/algoliasearch-magento-2/Test

Block/Adminhtml/Category/Merchandising.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Algolia\AlgoliaSearch\Helper\ConfigHelper;
66
use Algolia\AlgoliaSearch\Helper\Data;
7-
use Algolia\AlgoliaSearch\Helper\ProxyHelper;
87
use Magento\Backend\Block\Template\Context;
98
use Magento\Catalog\Model\Category;
109
use Magento\Framework\Registry;
@@ -23,9 +22,6 @@ class Merchandising extends \Magento\Backend\Block\Template
2322
/** @var Data */
2423
private $coreHelper;
2524

26-
/** @var ProxyHelper */
27-
private $proxyHelper;
28-
2925
/** @var \Magento\Store\Model\StoreManagerInterface */
3026
private $storeManager;
3127

@@ -34,21 +30,18 @@ class Merchandising extends \Magento\Backend\Block\Template
3430
* @param Registry $registry
3531
* @param ConfigHelper $configHelper
3632
* @param Data $coreHelper
37-
* @param ProxyHelper $proxyHelper
3833
* @param array $data
3934
*/
4035
public function __construct(
4136
Context $context,
4237
Registry $registry,
4338
ConfigHelper $configHelper,
4439
Data $coreHelper,
45-
ProxyHelper $proxyHelper,
4640
array $data = []
4741
) {
4842
$this->registry = $registry;
4943
$this->configHelper = $configHelper;
5044
$this->coreHelper = $coreHelper;
51-
$this->proxyHelper = $proxyHelper;
5245
$this->storeManager = $context->getStoreManager();
5346

5447
parent::__construct($context, $data);
@@ -89,20 +82,6 @@ public function getCoreHelper()
8982
return $this->coreHelper;
9083
}
9184

92-
/** @return bool */
93-
public function isQueryRulesEnabled()
94-
{
95-
$info = $this->proxyHelper->getInfo(ProxyHelper::INFO_TYPE_QUERY_RULES);
96-
97-
// In case the call to API proxy fails,
98-
// be "nice" and return true
99-
if ($info && array_key_exists('query_rules', $info)) {
100-
return $info['query_rules'];
101-
}
102-
103-
return true;
104-
}
105-
10685
/**
10786
* @throws \Magento\Framework\Exception\NoSuchEntityException
10887
*

Block/Adminhtml/LandingPage/SearchConfiguration.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Algolia\AlgoliaSearch\Helper\ConfigHelper;
66
use Algolia\AlgoliaSearch\Helper\Data;
7-
use Algolia\AlgoliaSearch\Helper\ProxyHelper;
87
use Algolia\AlgoliaSearch\Model\LandingPage;
98
use Magento\Backend\Block\Template\Context;
109
use Magento\Framework\Registry;
@@ -23,9 +22,6 @@ class SearchConfiguration extends \Magento\Backend\Block\Template
2322
/** @var Data */
2423
private $coreHelper;
2524

26-
/** @var ProxyHelper */
27-
protected $proxyHelper;
28-
2925
/** @var int */
3026
protected $planLevel;
3127

@@ -34,21 +30,18 @@ class SearchConfiguration extends \Magento\Backend\Block\Template
3430
* @param Registry $registry
3531
* @param ConfigHelper $configHelper
3632
* @param Data $coreHelper
37-
* @param ProxyHelper $proxyHelper
3833
* @param array $data
3934
*/
4035
public function __construct(
4136
Context $context,
4237
Registry $registry,
4338
ConfigHelper $configHelper,
4439
Data $coreHelper,
45-
ProxyHelper $proxyHelper,
4640
array $data = []
4741
) {
4842
$this->registry = $registry;
4943
$this->configHelper = $configHelper;
5044
$this->coreHelper = $coreHelper;
51-
$this->proxyHelper = $proxyHelper;
5245

5346
parent::__construct($context, $data);
5447
}
@@ -70,20 +63,4 @@ public function getCoreHelper()
7063
{
7164
return $this->coreHelper;
7265
}
73-
74-
/** @return int */
75-
public function getPlanLevel()
76-
{
77-
if ($this->planLevel == null) {
78-
$planLevel = 1;
79-
$planLevelInfo = $this->proxyHelper->getInfo(ProxyHelper::INFO_TYPE_PLAN_LEVEL);
80-
81-
if (isset($planLevelInfo['plan_level'])) {
82-
$planLevel = (int) $planLevelInfo['plan_level'];
83-
}
84-
$this->planLevel = $planLevel;
85-
}
86-
87-
return $this->planLevel;
88-
}
8966
}

Block/Adminhtml/Query/Merchandising.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Algolia\AlgoliaSearch\Helper\ConfigHelper;
66
use Algolia\AlgoliaSearch\Helper\Data;
7-
use Algolia\AlgoliaSearch\Helper\ProxyHelper;
87
use Algolia\AlgoliaSearch\Model\Query;
98
use Magento\Backend\Block\Template\Context;
109
use Magento\Framework\Registry;
@@ -23,9 +22,6 @@ class Merchandising extends \Magento\Backend\Block\Template
2322
/** @var Data */
2423
private $coreHelper;
2524

26-
/** @var ProxyHelper */
27-
private $proxyHelper;
28-
2925
/** @var \Magento\Store\Model\StoreManagerInterface */
3026
private $storeManager;
3127

@@ -34,21 +30,18 @@ class Merchandising extends \Magento\Backend\Block\Template
3430
* @param Registry $registry
3531
* @param ConfigHelper $configHelper
3632
* @param Data $coreHelper
37-
* @param ProxyHelper $proxyHelper
3833
* @param array $data
3934
*/
4035
public function __construct(
4136
Context $context,
4237
Registry $registry,
4338
ConfigHelper $configHelper,
4439
Data $coreHelper,
45-
ProxyHelper $proxyHelper,
4640
array $data = []
4741
) {
4842
$this->registry = $registry;
4943
$this->configHelper = $configHelper;
5044
$this->coreHelper = $coreHelper;
51-
$this->proxyHelper = $proxyHelper;
5245
$this->storeManager = $context->getStoreManager();
5346

5447
parent::__construct($context, $data);
@@ -72,20 +65,6 @@ public function getCoreHelper()
7265
return $this->coreHelper;
7366
}
7467

75-
/** @return bool */
76-
public function isQueryRulesEnabled()
77-
{
78-
$info = $this->proxyHelper->getInfo(ProxyHelper::INFO_TYPE_QUERY_RULES);
79-
80-
// In case the call to API proxy fails,
81-
// be "nice" and return true
82-
if ($info && array_key_exists('query_rules', $info)) {
83-
return $info['query_rules'];
84-
}
85-
86-
return true;
87-
}
88-
8968
/**
9069
* @throws \Magento\Framework\Exception\NoSuchEntityException
9170
*

Block/Configuration.php

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,7 @@ public function getConfiguration()
286286

287287
private function areCategoriesInFacets($facets)
288288
{
289-
foreach ($facets as $facet) {
290-
if ($facet['attribute'] === 'categories') {
291-
return true;
292-
}
293-
}
294-
295-
return false;
289+
return in_array('categories', array_column($facets, 'attribute'));
296290
}
297291

298292
private function getUrlTrackedParameters()
@@ -336,28 +330,16 @@ private function isLandingPage()
336330

337331
private function getLandingPageId()
338332
{
339-
if (!$this->isLandingPage()) {
340-
return '';
341-
}
342-
343-
return $this->getCurrentLandingPage()->getId();
333+
return $this->isLandingPage() ? $this->getCurrentLandingPage()->getId() : '';
344334
}
345335

346336
private function getLandingPageQuery()
347337
{
348-
if (!$this->isLandingPage()) {
349-
return '';
350-
}
351-
352-
return $this->getCurrentLandingPage()->getQuery();
338+
return $this->isLandingPage() ? $this->getCurrentLandingPage()->getQuery() : '';
353339
}
354340

355341
private function getLandingPageConfiguration()
356342
{
357-
if (!$this->isLandingPage()) {
358-
return json_encode([]);
359-
}
360-
361-
return $this->getCurrentLandingPage()->getConfiguration();
343+
return $this->isLandingPage() ? $this->getCurrentLandingPage()->getConfiguration() : json_encode([]);
362344
}
363345
}

Block/System/Form/Field/Logo.php

Lines changed: 0 additions & 46 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# CHANGE LOG
22

3+
## 3.2.0
4+
5+
### UPDATES
6+
- Update module sequence and indexers (#1132)
7+
- Add additional attributes for customer groups (#1144)
8+
- Add priceRanges back to uistate (#1151)
9+
- Set visibility of getTaxPrice() to public in ProductWithoutChildren (#1159) (@JeroenVanLeusden)
10+
- Improve check: and try to handle URL by URL rewrites if request path is NULL. (#1149) (@vmalyk)
11+
- Unfilter getCoreCategories() from private getCategoryById() (#1154)
12+
- Add ability to change region for Analytics call (#1131) (@bchatard)
13+
14+
### FIXES
15+
- Add missing indexName for autocomplete sections (#1133)
16+
- Add check if color object is defined for adaptive images (#1135)
17+
- Add small change on category indexing for Enterprise Edition (#1136)
18+
- Refactor loops and fix analytics overview issues (#1137)
19+
- Fix missing 'out of' translation on search results page (#1139) (@NickdeK)
20+
- Restore query value in custom instant search box (#1142) (@vmalyk)
21+
- Fix instantsearch rangeInput labels (#1148)
22+
- Recalculate special price if zero default pricing (#1160)
23+
- Add missing label for queue method rebuildCategoryIndex (#1152) (@tezlopchan)
24+
- Fix max original price for product with children (#1155) (@valeriish)
25+
- Store scope category merchandising based on store_id param (#1156)
26+
- Fix Subproduct Image Data (#1157)
27+
- Add try/catch to add to cart push events (#1158)
28+
- Fix for BE side renderting and caching 2 types of content (#1161) (@sudma)
29+
- Fix: categories not included filtering on product listing (#1163)
30+
- Fix: removing old feature checking for C&C that triggers deprecated endpoint (#1164)
31+
32+
### TOOLING
33+
- Update CI testing (#1140)
34+
335
## 3.1.0
436

537
### UPDATES

0 commit comments

Comments
 (0)