File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
app/code/Magento/CatalogRule/Model/Indexer Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -295,18 +295,17 @@ protected function doReindexByIds($ids)
295
295
foreach ($ ids as $ productId ) {
296
296
foreach ($ activeRules as $ activeRule ) {
297
297
$ rule = clone $ activeRule ;
298
- $ rule ->setProductsFilter ($ productId );
298
+ $ rule ->setProductsFilter ($ ids );
299
299
$ matchedProductIds = $ rule ->getMatchingProductIds ();
300
- if (!isset ($ matchedProductIds [$ productId ])) {
301
- continue ;
300
+ $ matchedProductIds = array_intersect_key ($ matchedProductIds , array_flip ($ ids ));
301
+ foreach ($ matchedProductIds as $ matchedProductId => $ validationByWebsite ) {
302
+ $ websiteIds = array_keys (array_filter ($ validationByWebsite ));
303
+ if (empty ($ websiteIds )) {
304
+ continue ;
305
+ }
306
+
307
+ $ this ->assignProductToRule ($ rule , $ matchedProductId , $ websiteIds );
302
308
}
303
-
304
- $ websiteIds = array_keys (array_filter ($ matchedProductIds [$ productId ]));
305
- if (empty ($ websiteIds )) {
306
- continue ;
307
- }
308
-
309
- $ this ->assignProductToRule ($ rule , $ productId , $ websiteIds );
310
309
}
311
310
312
311
$ this ->cleanProductPriceIndex ([$ productId ]);
You can’t perform that action at this time.
0 commit comments