@@ -452,11 +452,12 @@ public function setSettings($indexName, $indexNameTmp, $storeId, $saveToTmpIndic
452
452
* Handle replicas
453
453
*/
454
454
$ sortingIndices = $ this ->configHelper ->getSortingIndices ($ indexName , $ storeId );
455
+
455
456
$ replicas = [];
456
457
457
458
if ($ this ->configHelper ->isInstantEnabled ($ storeId )) {
458
459
$ replicas = array_values (array_map (function ($ sortingIndex ) {
459
- rreturn $ sortingIndex ['name ' ];
460
+ return $ sortingIndex ['name ' ];
460
461
}, $ sortingIndices ));
461
462
}
462
463
@@ -482,6 +483,7 @@ public function setSettings($indexName, $indexNameTmp, $storeId, $saveToTmpIndic
482
483
$ this ->logger ->log ('Setting replicas to " ' . $ indexName . '" index. ' );
483
484
$ this ->logger ->log ('Replicas: ' . json_encode ($ replicas ));
484
485
$ setReplicasTaskId = $ this ->algoliaHelper ->getLastTaskId ();
486
+
485
487
if (!$ this ->configHelper ->useVirtualReplica ($ storeId )) {
486
488
foreach ($ sortingIndices as $ values ) {
487
489
$ replicaName = $ values ['name ' ];
@@ -572,6 +574,7 @@ public function getObject(Product $product)
572
574
);
573
575
574
576
$ defaultData = $ transport ->getData ();
577
+
575
578
$ visibility = $ product ->getVisibility ();
576
579
577
580
$ visibleInCatalog = $ this ->visibility ->getVisibleInCatalogIds ();
@@ -1051,6 +1054,7 @@ protected function addAdditionalAttributes($customData, $additionalAttributes, P
1051
1054
}
1052
1055
1053
1056
$ attributeResource = $ attributeResource ->setData ('store_id ' , $ product ->getStoreId ());
1057
+
1054
1058
$ value = $ product ->getData ($ attributeName );
1055
1059
1056
1060
if ($ value !== null ) {
@@ -1553,7 +1557,7 @@ public function handlingReplica($indexName, $storeId, $sortingAttribute = false)
1553
1557
}, $ sortingIndices ));
1554
1558
try {
1555
1559
if ($ this ->configHelper ->useVirtualReplica ($ storeId )) {
1556
- $ replicas = $ this ->handleVirtualReplica ($ replicas , $ indexName );
1560
+ $ replicas = $ this ->handleVirtualReplica ($ replicas , $ indexName );
1557
1561
}
1558
1562
$ currentSettings = $ this ->algoliaHelper ->getSettings ($ indexName );
1559
1563
if (is_array ($ currentSettings ) && array_key_exists ('replicas ' , $ currentSettings )) {
0 commit comments