Skip to content

Commit 02a7a53

Browse files
committed
Merge remote-tracking branch 'engcom/graphql-develop-prs' into graphql-develop-prs
2 parents dcbf99b + b0919e8 commit 02a7a53

File tree

3 files changed

+4
-25
lines changed

3 files changed

+4
-25
lines changed

app/code/Magento/Sitemap/Model/ResourceModel/Catalog/Product.php

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ protected function _addFilter($storeId, $attributeCode, $value, $type = '=')
194194
break;
195195
default:
196196
return false;
197-
break;
198197
}
199198

200199
$attribute = $this->_getAttribute($attributeCode);
@@ -310,10 +309,6 @@ public function getCollection($storeId)
310309
}
311310

312311
$connection = $this->getConnection();
313-
$urlsConfigCondition = '';
314-
if ($this->isCategoryProductURLsConfig($storeId)) {
315-
$urlsConfigCondition = 'NOT ';
316-
}
317312

318313
$this->_select = $connection->select()->from(
319314
['e' => $this->getMainTable()],
@@ -324,9 +319,7 @@ public function getCollection($storeId)
324319
[]
325320
)->joinLeft(
326321
['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'
330323
. $connection->quoteInto(' AND url_rewrite.store_id = ?', $store->getId())
331324
. $connection->quoteInto(' AND url_rewrite.entity_type = ?', ProductUrlRewriteGenerator::ENTITY_TYPE),
332325
['url' => 'request_path']
@@ -490,20 +483,4 @@ private function getProductImageUrl($image)
490483
{
491484
return $this->imageUrlBuilder->getUrl($image, 'product_page_image_large');
492485
}
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-
}
509486
}

dev/tests/api-functional/testsuite/Magento/GraphQl/Bundle/BundleProductViewTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
use Magento\TestFramework\ObjectManager;
1616
use Magento\TestFramework\TestCase\GraphQlAbstract;
1717

18+
/**
19+
* Bundle product view test
20+
*/
1821
class BundleProductViewTest extends GraphQlAbstract
1922
{
2023
const KEY_PRICE_TYPE_FIXED = 'FIXED';

dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/product_with_category_rollback.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
/** @var ProductRepositoryInterface $productRepository */
2323
$productRepository = $objectManager->get(ProductRepositoryInterface::class);
24-
//$productRepository->deleteById('p002');
2524
$product = $productRepository->get('p002', false, null, true);
2625
$productRepository->delete($product);
2726

0 commit comments

Comments
 (0)