@@ -194,7 +194,6 @@ protected function _addFilter($storeId, $attributeCode, $value, $type = '=')
194
194
break ;
195
195
default :
196
196
return false ;
197
- break ;
198
197
}
199
198
200
199
$ attribute = $ this ->_getAttribute ($ attributeCode );
@@ -310,10 +309,6 @@ public function getCollection($storeId)
310
309
}
311
310
312
311
$ connection = $ this ->getConnection ();
313
- $ urlsConfigCondition = '' ;
314
- if ($ this ->isCategoryProductURLsConfig ($ storeId )) {
315
- $ urlsConfigCondition = 'NOT ' ;
316
- }
317
312
318
313
$ this ->_select = $ connection ->select ()->from (
319
314
['e ' => $ this ->getMainTable ()],
@@ -324,9 +319,7 @@ public function getCollection($storeId)
324
319
[]
325
320
)->joinLeft (
326
321
['url_rewrite ' => $ this ->getTable ('url_rewrite ' )],
327
- 'e.entity_id = url_rewrite.entity_id AND url_rewrite.is_autogenerated = 1 '
328
- . 'AND NULLIF(url_rewrite.metadata,"") IS '
329
- . $ urlsConfigCondition . 'NULL '
322
+ 'e.entity_id = url_rewrite.entity_id AND url_rewrite.is_autogenerated = 1 AND url_rewrite.metadata IS NULL '
330
323
. $ connection ->quoteInto (' AND url_rewrite.store_id = ? ' , $ store ->getId ())
331
324
. $ connection ->quoteInto (' AND url_rewrite.entity_type = ? ' , ProductUrlRewriteGenerator::ENTITY_TYPE ),
332
325
['url ' => 'request_path ' ]
@@ -490,20 +483,4 @@ private function getProductImageUrl($image)
490
483
{
491
484
return $ this ->imageUrlBuilder ->getUrl ($ image , 'product_page_image_large ' );
492
485
}
493
-
494
- /**
495
- * Return Use Categories Path for Product URLs config value
496
- *
497
- * @param null|string $storeId
498
- *
499
- * @return bool
500
- */
501
- private function isCategoryProductURLsConfig ($ storeId )
502
- {
503
- return $ this ->scopeConfig ->isSetFlag (
504
- HelperProduct::XML_PATH_PRODUCT_URL_USE_CATEGORY ,
505
- ScopeInterface::SCOPE_STORE ,
506
- $ storeId
507
- );
508
- }
509
486
}
0 commit comments