Skip to content

Commit fc2f611

Browse files
author
Cari Spruiell
committed
Merge remote-tracking branch 'mainline/develop' into pull-request
2 parents 604579f + 2eaa8b5 commit fc2f611

File tree

187 files changed

+3379
-774
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+3379
-774
lines changed

app/code/Magento/Backend/etc/adminhtml/di.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,9 @@
133133
</arguments>
134134
</type>
135135
<preference for="Magento\Framework\App\Router\PathConfigInterface" type="Magento\Backend\Model\AdminPathConfig" />
136+
<type name="Magento\Framework\View\Page\Config">
137+
<arguments>
138+
<argument name="isIncludesAvailable" xsi:type="boolean">false</argument>
139+
</arguments>
140+
</type>
136141
</config>

app/code/Magento/Catalog/Api/AttributeSetFinderInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
*/
77
namespace Magento\Catalog\Api;
88

9+
/**
10+
* Interface AttributeSetFinderInterface
11+
* @api
12+
*/
913
interface AttributeSetFinderInterface
1014
{
1115
/**

app/code/Magento/Catalog/Api/Data/CategoryProductSearchResultInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
*/
77
namespace Magento\Catalog\Api\Data;
88

9+
/**
10+
* Interface CategoryProductSearchResultInterface
11+
* @api
12+
*/
913
interface CategoryProductSearchResultInterface extends \Magento\Framework\Api\SearchResultsInterface
1014
{
1115
/**

app/code/Magento/Catalog/Api/Data/ProductOptionInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/**
1111
* Product option interface
12+
* @api
1213
*/
1314
interface ProductOptionInterface extends ExtensibleDataInterface
1415
{

app/code/Magento/Catalog/Api/ProductWebsiteLinkRepositoryInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
namespace Magento\Catalog\Api;
88

9+
/**
10+
* Interface ProductWebsiteLinkRepositoryInterface
11+
* @api
12+
*/
913
interface ProductWebsiteLinkRepositoryInterface
1014
{
1115
/**

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
use Magento\ImportExport\Model\Import;
1717
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingError;
1818
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface;
19-
use Magento\Catalog\Api\Data\ProductInterface;
2019
use Magento\ImportExport\Model\Import\Entity\AbstractEntity;
21-
20+
use Magento\Catalog\Model\Product\Visibility;
2221
/**
2322
* Import entity product model
2423
* @SuppressWarnings(PHPMD.TooManyFields)
@@ -104,6 +103,11 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
104103
*/
105104
const COL_CATEGORY = 'categories';
106105

106+
/**
107+
* Column product visibility.
108+
*/
109+
const COL_VISIBILITY = 'visibility';
110+
107111
/**
108112
* Column product sku.
109113
*/
@@ -2286,7 +2290,8 @@ public function validateRow(array $rowData, $rowNum)
22862290
}
22872291
// validate custom options
22882292
$this->getOptionEntity()->validateRow($rowData, $rowNum);
2289-
if (!empty($rowData[self::URL_KEY]) || !empty($rowData[self::COL_NAME])) {
2293+
2294+
if ($this->isNeedToValidateUrlKey($rowData)) {
22902295
$urlKey = $this->getUrlKey($rowData);
22912296
$storeCodes = empty($rowData[self::COL_STORE_VIEW_CODE])
22922297
? array_flip($this->storeResolver->getStoreCodeToId())
@@ -2308,6 +2313,18 @@ public function validateRow(array $rowData, $rowNum)
23082313
return !$this->getErrorAggregator()->isRowInvalid($rowNum);
23092314
}
23102315

2316+
/**
2317+
* @param array $rowData
2318+
* @return bool
2319+
*/
2320+
private function isNeedToValidateUrlKey($rowData)
2321+
{
2322+
return (!empty($rowData[self::URL_KEY]) || !empty($rowData[self::COL_NAME]))
2323+
&& (empty($rowData[self::COL_VISIBILITY])
2324+
|| $rowData[self::COL_VISIBILITY]
2325+
!== (string)Visibility::getOptionArray()[Visibility::VISIBILITY_NOT_VISIBLE]);
2326+
}
2327+
23112328
/**
23122329
* Prepare new SKU data
23132330
*

app/code/Magento/CatalogRule/Api/CatalogRuleRepositoryInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,34 @@
55
*/
66
namespace Magento\CatalogRule\Api;
77

8+
/**
9+
* Interface CatalogRuleRepositoryInterface
10+
* @api
11+
*/
812
interface CatalogRuleRepositoryInterface
913
{
1014
/**
11-
* @api
1215
* @param \Magento\CatalogRule\Api\Data\RuleInterface $rule
1316
* @return \Magento\CatalogRule\Api\Data\RuleInterface
1417
* @throws \Magento\Framework\Exception\CouldNotSaveException
1518
*/
1619
public function save(\Magento\CatalogRule\Api\Data\RuleInterface $rule);
1720

1821
/**
19-
* @api
2022
* @param int $ruleId
2123
* @return \Magento\CatalogRule\Api\Data\RuleInterface
2224
* @throws \Magento\Framework\Exception\NoSuchEntityException
2325
*/
2426
public function get($ruleId);
2527

2628
/**
27-
* @api
2829
* @param \Magento\CatalogRule\Api\Data\RuleInterface $rule
2930
* @return bool
3031
* @throws \Magento\Framework\Exception\CouldNotDeleteException
3132
*/
3233
public function delete(\Magento\CatalogRule\Api\Data\RuleInterface $rule);
3334

3435
/**
35-
* @api
3636
* @param int $ruleId
3737
* @return bool
3838
* @throws \Magento\Framework\Exception\CouldNotDeleteException

app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Store/Group.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ protected function generateProductUrls($websiteId, $originWebsiteId)
113113
$collection = $this->productFactory->create()
114114
->getCollection()
115115
->addCategoryIds()
116-
->addAttributeToSelect(['name', 'url_path', 'url_key'])
116+
->addAttributeToSelect(['name', 'url_path', 'url_key', 'visibility'])
117117
->addWebsiteFilter($websiteIds);
118118
foreach ($collection as $product) {
119119
/** @var \Magento\Catalog\Model\Product $product */

app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Store/View.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ protected function generateProductUrls($websiteId, $originWebsiteId, $storeId)
100100
$collection = $this->productFactory->create()
101101
->getCollection()
102102
->addCategoryIds()
103-
->addAttributeToSelect(['name', 'url_path', 'url_key'])
103+
->addAttributeToSelect(['name', 'url_path', 'url_key', 'visibility'])
104104
->addWebsiteFilter($websiteIds);
105105
foreach ($collection as $product) {
106106
$product->setStoreId($storeId);

app/code/Magento/CatalogUrlRewrite/Model/ProductUrlRewriteGenerator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\CatalogUrlRewrite\Model\Product\AnchorUrlRewriteGenerator;
1313
use Magento\CatalogUrlRewrite\Service\V1\StoreViewService;
1414
use Magento\Store\Model\Store;
15+
use Magento\Catalog\Model\Product\Visibility;
1516

1617
/**
1718
* Class ProductUrlRewriteGenerator
@@ -98,6 +99,10 @@ private function getAnchorUrlRewriteGenerator()
9899
*/
99100
public function generate(Product $product)
100101
{
102+
if ($product->getVisibility() == Visibility::VISIBILITY_NOT_VISIBLE) {
103+
return [];
104+
}
105+
101106
$this->product = $product;
102107
$storeId = $this->product->getStoreId();
103108

0 commit comments

Comments
 (0)