File tree Expand file tree Collapse file tree 1 file changed +15
-26
lines changed
app/code/Meta/Catalog/Model/Category Expand file tree Collapse file tree 1 file changed +15
-26
lines changed Original file line number Diff line number Diff line change @@ -315,34 +315,23 @@ private function pushCategoriesToFBCollections(
315
315
if (!$ isVisibleOnMeta && !$ isAllCategoriesSyncEnabled ) {
316
316
continue ;
317
317
}
318
-
319
- $ setId = $ category ->getData (SystemConfig::META_PRODUCT_SET_ID );
318
+
320
319
$ products = $ this ->categoryUtilities ->getCategoryProducts ($ category , $ storeId );
321
- if ($ setId ) {
322
- $ requests [] = $ this ->updateCategoryWithFBRequestJson (
323
- $ category ,
324
- $ products ,
325
- $ setId ,
326
- $ storeId ,
327
- $ isVisibleOnMeta
328
- );
329
- } else {
330
- if ($ products ->getSize () === 0 ) {
331
- $ this ->fbeHelper ->log (sprintf (
332
- "Category update: Empty CATEGORY %s and store %s, product set creation skipped " ,
333
- $ category ->getName (),
334
- $ storeId
335
- ));
336
- continue ;
337
- }
338
- $ requests [] = $ this ->pushCategoryWithFBRequestJson (
339
- $ category ,
340
- $ products ,
341
- $ catalogId ,
342
- $ storeId ,
343
- $ isVisibleOnMeta
344
- );
320
+ if ($ products ->getSize () === 0 ) {
321
+ $ this ->fbeHelper ->log (sprintf (
322
+ "Category update: Empty CATEGORY %s and store %s, product set creation skipped " ,
323
+ $ category ->getName (),
324
+ $ storeId
325
+ ));
326
+ continue ;
345
327
}
328
+ $ requests [] = $ this ->pushCategoryWithFBRequestJson (
329
+ $ category ,
330
+ $ products ,
331
+ $ catalogId ,
332
+ $ storeId ,
333
+ $ isVisibleOnMeta
334
+ );
346
335
$ updatedCategories [] = $ category ;
347
336
if (count ($ requests ) === self ::BATCH_MAX ) {
348
337
$ batchResponse = $ this ->flushCategoryBatchRequest (
You can’t perform that action at this time.
0 commit comments