Skip to content

Commit 98f7505

Browse files
committed
Merge remote-tracking branch 'mainline/develop' into PR_Branch
2 parents f145821 + 2f91db8 commit 98f7505

File tree

56 files changed

+907
-136
lines changed

Some content is hidden

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

56 files changed

+907
-136
lines changed

app/code/Magento/Backend/view/adminhtml/templates/page/js/calendar.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ require([
5050
showTime: false,
5151
showHour: false,
5252
showMinute: false,
53+
serverTimezoneSeconds: <?php echo (int) $block->getStoreTimestamp(); ?>,
5354
yearRange: '<?php /* @escapeNotVerified */ echo $block->getYearRange() ?>'
5455
}
5556
});

app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
</field>
7575
<field name="theme">
7676
<argument name="data" xsi:type="array">
77-
<item name="options" xsi:type="object">Magento\Framework\View\Design\Theme\Label</item>
77+
<item name="options" xsi:type="object">Magento\Theme\Model\Design\Theme\Label</item>
7878
<item name="config" xsi:type="array">
7979
<item name="formElement" xsi:type="string">select</item>
8080
<item name="dataType" xsi:type="string">text</item>

app/code/Magento/Bundle/Model/Product/Price.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,9 @@ public function getFinalPrice($qty, $product)
183183
$finalPrice = $this->_applyOptionsPrice($product, $qty, $finalPrice);
184184
$finalPrice += $this->getTotalBundleItemsPrice($product, $qty);
185185

186+
$finalPrice = max(0, $finalPrice);
186187
$product->setFinalPrice($finalPrice);
187-
return max(0, $product->getData('final_price'));
188+
return $finalPrice;
188189
}
189190

190191
/**

app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ protected function _prepareForm()
7070
}
7171
$this->_coreRegistry->register('attribute_type_hidden_fields', $_hiddenFields);
7272

73-
$this->_eventManager->dispatch('product_attribute_form_build_main_tab', ['form' => $form]);
74-
7573
$frontendInputValues = array_merge($frontendInputElm->getValues(), $additionalTypes);
7674
$frontendInputElm->setValues($frontendInputValues);
7775

76+
$this->_eventManager->dispatch('product_attribute_form_build_main_tab', ['form' => $form]);
77+
7878
return $this;
7979
}
8080

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ protected function createActionPage($title = null)
8888
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
8989
$resultPage = $this->resultPageFactory->create();
9090
if ($this->getRequest()->getParam('popup')) {
91-
if ($this->getRequest()->getParam('product_tab') == 'variations') {
91+
if ($this->getRequest()->getParam('product_tab') === 'variations') {
9292
$resultPage->addHandle(['popup', 'catalog_product_attribute_edit_product_tab_variations_popup']);
9393
} else {
9494
$resultPage->addHandle(['popup', 'catalog_product_attribute_edit_popup']);

app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class StockDataFilter
1616
/**
1717
* The greatest value which could be stored in CatalogInventory Qty field
1818
*/
19-
const MAX_QTY_VALUE = 99999999.9999;
19+
const MAX_QTY_VALUE = 99999999;
2020

2121
/**
2222
* @var ScopeConfigInterface

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,6 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements
142142
*/
143143
protected $optionInstance;
144144

145-
/**
146-
* @var bool
147-
*/
148-
protected $optionsInitialized = false;
149-
150145
/**
151146
* @var array
152147
*/
@@ -1901,6 +1896,7 @@ public function addOption(Product\Option $option)
19011896
{
19021897
$options = (array)$this->getData('options');
19031898
$options[] = $option;
1899+
$option->setProduct($this);
19041900
$this->setData('options', $options);
19051901
return $this;
19061902
}

app/code/Magento/Catalog/view/adminhtml/web/js/bundle-proxy-button.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@ define([
5454
return this;
5555
},
5656

57+
/**
58+
* Calls 'destroy' of parent and
59+
* clear listing provider source
60+
*
61+
* @returns {Object} Chainable.
62+
*/
63+
destroy: function () {
64+
this._super();
65+
this.source.set(this.listingDataProvider, []);
66+
67+
return this;
68+
},
69+
5770
/**
5871
* Call parent "action" method
5972
* and set new data to record and listing.

app/code/Magento/CatalogInventory/Ui/DataProvider/Product/Form/Modifier/AdvancedInventory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\CatalogInventory\Ui\DataProvider\Product\Form\Modifier;
77

8+
use Magento\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter;
89
use Magento\Catalog\Model\Locator\LocatorInterface;
910
use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
1011
use Magento\CatalogInventory\Api\StockRegistryInterface;
@@ -213,6 +214,7 @@ private function prepareMeta()
213214
'validation' => [
214215
'validate-number' => true,
215216
'validate-digits' => true,
217+
'less-than-equals-to' => StockDataFilter::MAX_QTY_VALUE,
216218
],
217219
'imports' => [
218220
'handleChanges' => '${$.provider}:data.product.stock_data.is_qty_decimal',

app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
<item name="validation" xsi:type="array">
9797
<item name="validate-number" xsi:type="boolean">true</item>
9898
<item name="validate-digits" xsi:type="boolean">true</item>
99+
<item name="less-than-equals-to" xsi:type="number">99999999</item>
99100
</item>
100101
<item name="sortOrder" xsi:type="number">200</item>
101102
<item name="scopeLabel" xsi:type="string">[GLOBAL]</item>

0 commit comments

Comments
 (0)