Skip to content

Commit 53033ad

Browse files
author
Ivan Gavryshko
committed
Merge remote-tracking branch 'mainline/develop' into MAGETWO-52448-cloud-customer-address
2 parents a69c256 + 83782e8 commit 53033ad

File tree

117 files changed

+5462
-991
lines changed

Some content is hidden

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

117 files changed

+5462
-991
lines changed

app/code/Magento/AdminNotification/view/adminhtml/layout/default.xml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,20 @@
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
99
<body>
1010
<referenceContainer name="notifications">
11-
<block class="Magento\AdminNotification\Block\System\Messages" name="system_messages" as="system_messages" before="-" template="Magento_AdminNotification::system/messages.phtml"/>
12-
<block class="Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup" name="unread_system_messages" as="unread_system_messages" after="system_messages" template="Magento_AdminNotification::system/messages/popup.phtml"/>
13-
<block class="Magento\AdminNotification\Block\Window" name="notification_window" as="notification_window" acl="Magento_AdminNotification::show_toolbar" template="notification/window.phtml"/>
11+
<block class="Magento\AdminNotification\Block\System\Messages"
12+
name="system_messages"
13+
as="system_messages"
14+
before="-"
15+
template="Magento_AdminNotification::system/messages.phtml"/>
16+
<block class="Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup"
17+
name="unread_system_messages"
18+
as="unread_system_messages"
19+
template="Magento_AdminNotification::system/messages/popup.phtml"/>
20+
<block class="Magento\AdminNotification\Block\Window"
21+
name="notification_window"
22+
as="notification_window"
23+
acl="Magento_AdminNotification::show_toolbar"
24+
template="notification/window.phtml"/>
1425
</referenceContainer>
1526
<referenceContainer name="header">
1627
<block class="Magento\AdminNotification\Block\ToolbarEntry" name="notification.messages" before="user" template="toolbar_entry.phtml"/>

app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
/**
1414
* "Reset to Defaults" button renderer
1515
*
16+
* @deprecated
1617
* @author Magento Core Team <core@magentocommerce.com>
1718
*/
1819
class Reset extends \Magento\Config\Block\System\Config\Form\Field

app/code/Magento/Backend/Test/Unit/Block/Page/System/Config/Robots/ResetTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
*/
1010
namespace Magento\Backend\Test\Unit\Block\Page\System\Config\Robots;
1111

12+
/**
13+
* Class ResetTest
14+
* @deprecated
15+
* @package Magento\Backend\Test\Unit\Block\Page\System\Config\Robots
16+
*/
1217
class ResetTest extends \PHPUnit_Framework_TestCase
1318
{
1419
/**

app/code/Magento/Braintree/view/adminhtml/layout/sales_order_create_index.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
<argument name="template" xsi:type="string">Magento_Vault::form/vault.phtml</argument>
2020
</action>
2121
</referenceBlock>
22-
<referenceBlock name="content">
22+
<referenceBlock name="data">
2323
<block name="braintree_payment_script"
2424
as="braintree_payment_script"
25-
after="billing_method"
2625
template="Magento_Braintree::payment/script.phtml"
27-
class="Magento\Braintree\Block\Payment"/>
26+
class="Magento\Braintree\Block\Payment"
27+
after="billing_method"/>
2828
</referenceBlock>
2929
</body>
3030
</page>

app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function getValue()
124124
$value = $product->getData('final_price') * ($selectionPriceValue / 100);
125125
} else {
126126
// calculate price for selection type fixed
127-
$value = $this->priceCurrency->convert($selectionPriceValue) * $this->quantity;
127+
$value = $this->priceCurrency->convert($selectionPriceValue);
128128
}
129129
}
130130
if (!$this->useRegularPrice) {

app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleSelectionPriceTest.php

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,67 @@ public function testGetValueTypeFixedWithoutSelectionPriceType($useRegularPrice)
313313
$this->assertEquals($expectedPrice, $this->selectionPrice->getValue());
314314
}
315315

316+
/**
317+
* test for method getValue with type Fixed and selectionPriceType is empty or zero
318+
*
319+
* @param bool $useRegularPrice
320+
* @dataProvider useRegularPriceDataProvider
321+
*/
322+
public function testFixedPriceWithMultipleQty($useRegularPrice)
323+
{
324+
$qty = 2;
325+
326+
$selectionPrice = new \Magento\Bundle\Pricing\Price\BundleSelectionPrice(
327+
$this->productMock,
328+
$qty,
329+
$this->calculatorMock,
330+
$this->priceCurrencyMock,
331+
$this->bundleMock,
332+
$this->eventManagerMock,
333+
$this->discountCalculatorMock,
334+
$useRegularPrice
335+
);
336+
337+
$this->setupSelectionPrice($useRegularPrice);
338+
$regularPrice = 100.125;
339+
$discountedPrice = 70.453;
340+
$convertedValue = 100.247;
341+
$actualPrice = $useRegularPrice ? $convertedValue : $discountedPrice;
342+
$expectedPrice = $useRegularPrice ? round($convertedValue, 2) : round($discountedPrice, 2);
343+
344+
$this->bundleMock->expects($this->once())
345+
->method('getPriceType')
346+
->will($this->returnValue(\Magento\Bundle\Model\Product\Price::PRICE_TYPE_FIXED));
347+
$this->productMock->expects($this->once())
348+
->method('getSelectionPriceType')
349+
->will($this->returnValue(false));
350+
$this->productMock->expects($this->any())
351+
->method('getSelectionPriceValue')
352+
->will($this->returnValue($regularPrice));
353+
354+
$this->priceCurrencyMock->expects($this->once())
355+
->method('convert')
356+
->with($regularPrice)
357+
->will($this->returnValue($convertedValue));
358+
359+
if (!$useRegularPrice) {
360+
$this->discountCalculatorMock->expects($this->once())
361+
->method('calculateDiscount')
362+
->with(
363+
$this->equalTo($this->bundleMock),
364+
$this->equalTo($convertedValue)
365+
)
366+
->will($this->returnValue($discountedPrice));
367+
}
368+
369+
$this->priceCurrencyMock->expects($this->once())
370+
->method('round')
371+
->with($actualPrice)
372+
->will($this->returnValue($expectedPrice));
373+
374+
$this->assertEquals($expectedPrice, $selectionPrice->getValue());
375+
}
376+
316377
public function useRegularPriceDataProvider()
317378
{
318379
return [

app/code/Magento/Bundle/view/base/web/js/price-bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ define([
5555
this._setOption('priceFormat', priceBox.priceBox('option').priceConfig.priceFormat);
5656
priceBox.priceBox('setDefault', this.options.optionConfig.prices);
5757
}
58-
this._applyQtyFix();
5958
this._applyOptionNodeFix(options);
6059

6160
options.on('change', this._onBundleOptionChanged.bind(this));
@@ -113,6 +112,7 @@ define([
113112
* Helper to fix backend behavior:
114113
* - if default qty large than 1 then backend multiply price in config
115114
*
115+
* @deprecated
116116
* @private
117117
*/
118118
_applyQtyFix: function applyQtyFix() {

app/code/Magento/Bundle/view/frontend/layout/catalog_product_view_type_bundle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</block>
3737
</referenceBlock>
3838
<referenceBlock name="product.info.form.options">
39-
<container name="bundle.product.options.wrapper" htmlTag="div" htmlClass="bundle-options-wrapper" after="product.info.form.options" />
39+
<container name="bundle.product.options.wrapper" htmlTag="div" htmlClass="bundle-options-wrapper"/>
4040
</referenceBlock>
4141
<move element="product.info.options.wrapper" destination="bundle.product.options.wrapper" before="-" />
4242
<move element="product.info.options.wrapper.bottom" destination="bundle.product.options.wrapper" after="product.info.options.wrapper" />

app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_set_edit.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
<body>
1010
<referenceContainer name="content">
1111
<container name="adminhtml.catalog.product.set.edit.wrapper" htmlTag="div" htmlClass="admin__scope-old"><!-- @todo ui: remove arguments within .admin__scope-old -->
12-
<block class="Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Main" name="adminhtml.catalog.product.set.edit" template="catalog/product/attribute/set/main.phtml"/>
12+
<block class="Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Main"
13+
name="adminhtml.catalog.product.set.edit"
14+
template="catalog/product/attribute/set/main.phtml"/>
1315
</container>
1416
</referenceContainer>
1517
</body>

app/code/Magento/Catalog/view/frontend/layout/catalog_product_view.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</referenceBlock>
3131
<referenceContainer name="content">
3232
<container name="product.info.main" htmlTag="div" htmlClass="product-info-main" before="-">
33-
<container name="product.info.price" label="Product info auxiliary container" htmlTag="div" htmlClass="product-info-price" after="product.info.review">
33+
<container name="product.info.price" label="Product info auxiliary container" htmlTag="div" htmlClass="product-info-price">
3434
<container name="product.info.stock.sku" label="Product auxiliary info" htmlTag="div" htmlClass="product-info-stock-sku">
3535
<container name="product.info.type" before="-"/>
3636
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.sku" template="product/view/attribute.phtml" after="product.info.type">
@@ -44,7 +44,7 @@
4444
</block>
4545
</container>
4646
<block class="Magento\Catalog\Block\Product\View" name="product.info.review" template="product/view/review.phtml" after="product.info.stock.sku" />
47-
<block class="Magento\Catalog\Pricing\Render" name="product.price.final" after="product.info.sku">
47+
<block class="Magento\Catalog\Pricing\Render" name="product.price.final">
4848
<arguments>
4949
<argument name="price_render" xsi:type="string">product.price.render.default</argument>
5050
<argument name="price_type_code" xsi:type="string">final_price</argument>
@@ -81,7 +81,7 @@
8181
</block>
8282
</block>
8383
<container name="product.info.extrahint" as="extrahint" label="Product View Extra Hint">
84-
<container name="product.info.social" label="Product social links container" htmlTag="div" htmlClass="product-social-links" after="product.info.overview">
84+
<container name="product.info.social" label="Product social links container" htmlTag="div" htmlClass="product-social-links">
8585
<block class="Magento\Catalog\Block\Product\View" name="product.info.addto" as="addto" template="product/view/addto.phtml">
8686
<block class="Magento\Catalog\Block\Product\View\AddTo\Compare" name="view.addto.compare" after="view.addto.wishlist"
8787
template="Magento_Catalog::product/view/addto/compare.phtml" />

0 commit comments

Comments
 (0)