Skip to content

Commit fb244c0

Browse files
committed
Merge remote-tracking branch 'pub/develop' into MAGETWO-52958-1
2 parents b492caf + f8b51d3 commit fb244c0

File tree

207 files changed

+2245
-366
lines changed

Some content is hidden

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

207 files changed

+2245
-366
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@
55
/.settings
66
atlassian*
77
/nbproject
8+
/robots.txt
9+
/pub/robots.txt
810
/sitemap
911
/sitemap.xml
12+
/pub/sitemap
13+
/pub/sitemap.xml
1014
/.idea
1115
/.gitattributes
1216
/app/config_sandbox

.travis.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ addons:
99
- postfix
1010
language: php
1111
php:
12-
- 5.6.29
1312
- 7.0
1413
env:
1514
global:
@@ -30,12 +29,6 @@ cache:
3029
- $HOME/.nvm
3130
- $HOME/node_modules
3231
- $HOME/yarn.lock
33-
matrix:
34-
exclude:
35-
- php: 5.6.29
36-
env: TEST_SUITE=static
37-
- php: 5.6.29
38-
env: TEST_SUITE=js
3932
before_install: ./dev/travis/before_install.sh
4033
install: composer install --no-interaction --prefer-dist
4134
before_script: ./dev/travis/before_script.sh

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function getContent();
138138
/**
139139
* Set media gallery content
140140
*
141-
* @param $content \Magento\Framework\Api\Data\ImageContentInterface
141+
* @param \Magento\Framework\Api\Data\ImageContentInterface $content
142142
* @return $this
143143
*/
144144
public function setContent($content);

app/code/Magento/Catalog/Block/Product/View/Options.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public function getJsonConfig()
208208
$config = [];
209209
foreach ($this->getOptions() as $option) {
210210
/* @var $option \Magento\Catalog\Model\Product\Option */
211-
if ($option->getGroupByType() == \Magento\Catalog\Model\Product\Option::OPTION_GROUP_SELECT) {
211+
if ($option->hasValues()) {
212212
$tmpPriceValues = [];
213213
foreach ($option->getValues() as $valueId => $value) {
214214
$tmpPriceValues[$valueId] = $this->_getPriceConfiguration($value);

app/code/Magento/Catalog/Model/Product/Option.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,17 @@ public function getValueById($valueId)
217217
return null;
218218
}
219219

220+
/**
221+
* Whether or not the option type contains sub-values
222+
*
223+
* @param string $type
224+
* @return bool
225+
*/
226+
public function hasValues($type = null)
227+
{
228+
return $this->getGroupByType($type) == self::OPTION_GROUP_SELECT;
229+
}
230+
220231
/**
221232
* @return ProductCustomOptionValuesInterface[]|null
222233
*/

app/code/Magento/Catalog/Test/Unit/Model/Product/OptionTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ public function testGetProductSku()
3535
$this->assertEquals($productSku, $this->model->getProductSku());
3636
}
3737

38+
public function testHasValues()
39+
{
40+
$this->model->setType('drop_down');
41+
$this->assertTrue($this->model->hasValues());
42+
43+
$this->model->setType('field');
44+
$this->assertFalse($this->model->hasValues());
45+
}
46+
3847
public function testGetRegularPrice()
3948
{
4049
$priceInfoMock = $this->getMockForAbstractClass(

app/code/Magento/CatalogInventory/Model/StockManagement.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function registerProductsSale($items, $websiteId = null)
102102
if (!$stockItem->hasAdminArea()
103103
&& !$this->stockState->checkQty($productId, $orderedQty, $stockItem->getWebsiteId())
104104
) {
105-
$this->getResource()->commit();
105+
$this->getResource()->rollBack();
106106
throw new \Magento\Framework\Exception\LocalizedException(
107107
__('Not all of your products are available in the requested quantity.')
108108
);
@@ -180,7 +180,7 @@ protected function getProductType($productId)
180180
}
181181

182182
/**
183-
* @return Stock
183+
* @return ResourceStock
184184
*/
185185
protected function getResource()
186186
{

app/code/Magento/CatalogWidget/Model/Rule.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
use Magento\Framework\Api\ExtensionAttributesFactory;
1010

1111
/**
12-
* Class Rule
12+
* Rule for catalog widget
13+
*
14+
* @api
1315
*/
1416
class Rule extends \Magento\Rule\Model\AbstractModel
1517
{

app/code/Magento/CatalogWidget/Model/Rule/Condition/Combine.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
namespace Magento\CatalogWidget\Model\Rule\Condition;
67

78
/**
8-
* CatalogWidget Rule Combine Condition data model
9+
* Combination of product conditions
910
*/
10-
namespace Magento\CatalogWidget\Model\Rule\Condition;
11-
1211
class Combine extends \Magento\Rule\Model\Condition\Combine
1312
{
1413
/**
@@ -54,7 +53,7 @@ public function getNewChildSelectOptions()
5453
foreach ($productAttributes as $code => $label) {
5554
if (!in_array($code, $this->excludedAttributes)) {
5655
$attributes[] = [
57-
'value' => 'Magento\CatalogWidget\Model\Rule\Condition\Product|' . $code,
56+
'value' => Product::class . '|' . $code,
5857
'label' => $label,
5958
];
6059
}

app/code/Magento/Cms/Helper/Page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public function prepareResultPage(Action $action, $pageId = null)
152152
$resultPage = $this->resultPageFactory->create();
153153
$this->setLayoutType($inRange, $resultPage);
154154
$resultPage->addHandle('cms_page_view');
155-
$resultPage->addPageLayoutHandles(['id' => $this->_page->getIdentifier()]);
155+
$resultPage->addPageLayoutHandles(['id' => str_replace('/', '_', $this->_page->getIdentifier())]);
156156

157157
$this->_eventManager->dispatch(
158158
'cms_page_render',

0 commit comments

Comments
 (0)