@@ -310,10 +310,6 @@ public function getCollection($storeId)
310
310
}
311
311
312
312
$ connection = $ this ->getConnection ();
313
- $ urlsConfigCondition = '' ;
314
- if ($ this ->isCategoryProductURLsConfig ($ storeId )) {
315
- $ urlsConfigCondition = 'NOT ' ;
316
- }
317
313
318
314
$ this ->_select = $ connection ->select ()->from (
319
315
['e ' => $ this ->getMainTable ()],
@@ -324,9 +320,7 @@ public function getCollection($storeId)
324
320
[]
325
321
)->joinLeft (
326
322
['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 '
323
+ 'e.entity_id = url_rewrite.entity_id AND url_rewrite.is_autogenerated = 1 AND url_rewrite.metadata IS NULL '
330
324
. $ connection ->quoteInto (' AND url_rewrite.store_id = ? ' , $ store ->getId ())
331
325
. $ connection ->quoteInto (' AND url_rewrite.entity_type = ? ' , ProductUrlRewriteGenerator::ENTITY_TYPE ),
332
326
['url ' => 'request_path ' ]
@@ -490,20 +484,4 @@ private function getProductImageUrl($image)
490
484
{
491
485
return $ this ->imageUrlBuilder ->getUrl ($ image , 'product_page_image_large ' );
492
486
}
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
487
}
0 commit comments