Skip to content

Commit f91728f

Browse files
author
Bohdan Korablov
committed
Merge remote-tracking branch 'mainlinec/develop' into MAGETWO-51754
2 parents de4cbbc + 951694c commit f91728f

File tree

112 files changed

+1188
-750
lines changed

Some content is hidden

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

112 files changed

+1188
-750
lines changed

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ protected function _toOptionHtml($action, \Magento\Framework\DataObject $row)
8282
$actionCaption = '';
8383
$this->_transformActionData($action, $actionCaption, $row);
8484

85-
$htmlAttibutes = ['value' => $this->escapeHtml($this->_jsonEncoder->encode($action))];
86-
$actionAttributes->setData($htmlAttibutes);
85+
$htmlAttributes = ['value' => $this->escapeHtml($this->_jsonEncoder->encode($action))];
86+
$actionAttributes->setData($htmlAttributes);
8787
return '<option ' . $actionAttributes->serialize() . '>' . $actionCaption . '</option>';
8888
}
8989

app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<?php else: ?>
2626
<?php echo $block->getHintHtml() ?>
2727
<?php endif; ?>
28-
<div class="tree-store-scope">
28+
<div class="admin__fieldset tree-store-scope">
2929
<?php if ($_element->getComment()): ?>
3030
<p class="comment"><?php echo $block->escapeHtml($_element->getComment()) ?></p>
3131
<?php endif; ?>

app/code/Magento/Braintree/view/frontend/web/template/payment/form.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,26 +105,24 @@
105105
</div>
106106
<!-- /ko -->
107107
<!-- ko if: (isVaultEnabled())-->
108-
<div class="field">
108+
<div class="field choice">
109109
<input type="checkbox"
110110
name="vault[is_enabled]"
111-
class="checkbox-inline"
111+
class="checkbox"
112112
data-bind="attr: {'id': getCode() + '_vault_enabler'}, checked: vaultEnabler.isActivePaymentTokenEnabler"/>
113113
<label class="label" data-bind="attr: {'for': getCode() + '_vault_enabler'}">
114114
<span><!-- ko i18n: 'Save for later use.'--><!-- /ko --></span>
115115
</label>
116-
<div class="control _with-tooltip">
117-
<div class="field-tooltip toggle">
116+
<div class="field-tooltip toggle">
118117
<span class="field-tooltip-action action-vault"
119118
tabindex="0"
120119
data-toggle="dropdown"
121120
data-bind="attr: {title: $t('What is this?')}, mageInit: {'dropdown':{'activeClass': '_active'}}">
122121
<span translate="'What is this?'"></span>
123122
</span>
124-
<div class="field-tooltip-content"
125-
data-target="dropdown"
126-
translate="'We store you payment information securely on Braintree servers via SSL.'"></div>
127-
</div>
123+
<div class="field-tooltip-content"
124+
data-target="dropdown"
125+
translate="'We store you payment information securely on Braintree servers via SSL.'"></div>
128126
</div>
129127
</div>
130128
<!-- /ko -->

app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePanel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ protected function getBundleSelections()
578578
'parentSelections' => 'bundle_selections',
579579
'changer' => 'option_info.type',
580580
'dataType' => Form\Element\DataType\Boolean::NAME,
581-
'label' => __('Default'),
581+
'label' => __('Is Default'),
582582
'dataScope' => 'is_default',
583583
'prefer' => 'radio',
584584
'value' => '0',

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ protected function _getValidationRulesBeforeSave()
567567
public function getProductSku()
568568
{
569569
$productSku = $this->_getData(self::KEY_PRODUCT_SKU);
570-
if (!$productSku) {
570+
if (!$productSku && $this->getProduct()) {
571571
$productSku = $this->getProduct()->getSku();
572572
}
573573
return $productSku;

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ public function duplicate(
125125
*/
126126
public function save(\Magento\Catalog\Api\Data\ProductCustomOptionInterface $option)
127127
{
128-
$product = $this->productRepository->get($option->getProductSku());
128+
$productSku = $option->getProductSku();
129+
if (!$productSku) {
130+
throw new CouldNotSaveException(__('ProductSku should be specified'));
131+
}
132+
$product = $this->productRepository->get($productSku);
129133
$metadata = $this->getMetadataPool()->getMetadata(ProductInterface::class);
130134
$option->setData('product_id', $product->getData($metadata->getLinkField()));
131135
$option->setOptionId(null);

app/code/Magento/Catalog/Setup/CategorySetup.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Magento\Framework\App\CacheInterface;
1515
use Magento\Framework\Setup\ModuleDataSetupInterface;
1616
use Magento\Catalog\Model\Product\Type;
17-
use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
1817

1918
class CategorySetup extends EavSetup
2019
{
@@ -598,7 +597,7 @@ public function getDefaultEntities()
598597
'filterable' => true,
599598
'comparable' => true,
600599
'visible_in_advanced_search' => true,
601-
'apply_to' => implode(',', [Type::TYPE_SIMPLE, Type::TYPE_VIRTUAL, Configurable::TYPE_CODE]),
600+
'apply_to' => implode(',', [Type::TYPE_SIMPLE, Type::TYPE_VIRTUAL]),
602601
'is_used_in_grid' => true,
603602
'is_visible_in_grid' => false,
604603
'is_filterable_in_grid' => true,

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

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,6 @@ public function testFactory()
142142

143143
public function testPriceFactory()
144144
{
145-
$this->assertInstanceOf(
146-
'\Magento\ConfigurableProduct\Model\Product\Type\Configurable\Price',
147-
$this->_model->priceFactory('type_id_3')
148-
);
149-
$this->assertInstanceOf(
150-
'\Magento\ConfigurableProduct\Model\Product\Type\Configurable\Price',
151-
$this->_model->priceFactory('type_id_3')
152-
);
153145
$this->assertInstanceOf(
154146
'\Magento\Catalog\Model\Product\Type\Price',
155147
$this->_model->priceFactory('type_id_1')
@@ -318,7 +310,7 @@ private function getMockedTypePriceFactory()
318310
->will(
319311
$this->returnValueMap(
320312
[
321-
['some_model', [], $this->getMockedProductTypeConfigurablePrice()],
313+
['some_model', [], $this->getMockedProductTypePrice()],
322314
['Magento\Catalog\Model\Product\Type\Price', [], $this->getMockedProductTypePrice()],
323315
]
324316
)
@@ -338,16 +330,4 @@ private function getMockedProductTypePrice()
338330

339331
return $mock;
340332
}
341-
342-
/**
343-
* @return \Magento\ConfigurableProduct\Model\Product\Type\Configurable\Price
344-
*/
345-
private function getMockedProductTypeConfigurablePrice()
346-
{
347-
$mockBuild = $this->getMockBuilder('\Magento\ConfigurableProduct\Model\Product\Type\Configurable\Price')
348-
->disableOriginalConstructor();
349-
$mock = $mockBuild->getMock();
350-
351-
return $mock;
352-
}
353333
}

app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -818,21 +818,6 @@ public function testSaveAndDuplicate()
818818
$this->model->afterSave();
819819
}
820820

821-
public function testGetIsSalableConfigurable()
822-
{
823-
$typeInstanceMock = $this->getMock(
824-
'Magento\ConfigurableProduct\Model\Product\Type\Configurable', ['getIsSalable'], [], '', false);
825-
826-
$typeInstanceMock
827-
->expects($this->atLeastOnce())
828-
->method('getIsSalable')
829-
->willReturn(true);
830-
831-
$this->model->setTypeInstance($typeInstanceMock);
832-
833-
self::assertTrue($this->model->getIsSalable());
834-
}
835-
836821
public function testGetIsSalableSimple()
837822
{
838823
$typeInstanceMock =

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AdvancedPricing.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,9 @@ protected function getTierPriceStructure($tierPricePath)
493493
'label' => __('Price'),
494494
'enableLabel' => true,
495495
'dataScope' => 'price',
496+
'addbefore' => $this->locator->getStore()
497+
->getBaseCurrency()
498+
->getCurrencySymbol(),
496499
],
497500
],
498501
],

0 commit comments

Comments
 (0)