@@ -19,13 +19,13 @@ define([
19
19
const apiKey = algoliaConfig . apiKey ;
20
20
const recommendClient = recommend ( appId , apiKey ) ;
21
21
const indexName = this . defaultIndexName ;
22
- const objectIds = config . productIds ? config . productIds : config . algoliObjectId ;
22
+ const objectIDs = config . objectIDs ;
23
23
if (
24
24
$ ( 'body' ) . hasClass ( 'catalog-product-view' ) ||
25
25
$ ( 'body' ) . hasClass ( 'checkout-cart-index' )
26
26
) {
27
27
// --- Add the current product objectID here ---
28
- if (
28
+ if (
29
29
( algoliaConfig . recommend . enabledFBT &&
30
30
$ ( 'body' ) . hasClass ( 'catalog-product-view' ) ) ||
31
31
( algoliaConfig . recommend . enabledFBTInCart &&
@@ -35,7 +35,7 @@ define([
35
35
container : '#frequentlyBoughtTogether' ,
36
36
recommendClient,
37
37
indexName,
38
- objectIDs : objectIds ,
38
+ objectIDs,
39
39
maxRecommendations : algoliaConfig . recommend . limitFBTProducts ,
40
40
transformItems : function ( items ) {
41
41
return items . map ( ( item , index ) => ( {
@@ -68,7 +68,7 @@ define([
68
68
container : '#relatedProducts' ,
69
69
recommendClient,
70
70
indexName,
71
- objectIDs : objectIds ,
71
+ objectIDs,
72
72
maxRecommendations : algoliaConfig . recommend . limitRelatedProducts ,
73
73
transformItems : function ( items ) {
74
74
return items . map ( ( item , index ) => ( {
@@ -176,7 +176,7 @@ define([
176
176
container : '#lookingSimilar' ,
177
177
recommendClient,
178
178
indexName,
179
- objectIDs : objectIds ,
179
+ objectIDs,
180
180
maxRecommendations : algoliaConfig . recommend . limitLookingSimilar ,
181
181
transformItems : function ( items ) {
182
182
return items . map ( ( item , index ) => ( {
@@ -200,15 +200,15 @@ define([
200
200
} ) ;
201
201
} else if (
202
202
algoliaConfig . recommend . enabledLookingSimilar &&
203
- objectIds &&
203
+ objectIDs &&
204
204
typeof config . recommendLSContainer !== 'undefined'
205
205
) {
206
206
let containerValue = '#' + config . recommendLSContainer ;
207
207
recommendJs . lookingSimilar ( {
208
208
container : containerValue ,
209
209
recommendClient,
210
210
indexName,
211
- objectIDs : objectIds ,
211
+ objectIDs,
212
212
maxRecommendations : config . numOfLookingSimilarItem
213
213
? parseInt ( config . numOfLookingSimilarItem )
214
214
: algoliaConfig . recommend . limitLookingSimilar ,
0 commit comments