Skip to content

Commit 8738b19

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-88946' into MAGETWO-88946
2 parents 8c89dc5 + 4ba429f commit 8738b19

File tree

14 files changed

+55
-27
lines changed

14 files changed

+55
-27
lines changed

app/code/Magento/BundleImportExport/Model/Export/RowCustomizer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ protected function getFormattedBundleSelections($optionValues, SelectionCollecti
242242
'price' => $selection->getSelectionPriceValue(),
243243
'default' => $selection->getIsDefault(),
244244
'default_qty' => $selection->getSelectionQty(),
245-
'price_type' => $this->getPriceTypeValue($selection->getSelectionPriceType())
245+
'price_type' => $this->getPriceTypeValue($selection->getSelectionPriceType()),
246+
'can_change_qty' => $selection->getSelectionCanChangeQty(),
246247
];
247248
$bundleData .= $optionValues
248249
. ImportModel::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR

app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ protected function populateSelectionTemplate($selection, $optionId, $parentId, $
299299
} else {
300300
$productId = $selection['product_id'];
301301
}
302+
302303
$populatedSelection = [
303304
'selection_id' => null,
304305
'option_id' => (int)$optionId,
@@ -310,7 +311,8 @@ protected function populateSelectionTemplate($selection, $optionId, $parentId, $
310311
? self::SELECTION_PRICE_TYPE_FIXED : self::SELECTION_PRICE_TYPE_PERCENT,
311312
'selection_price_value' => (isset($selection['price'])) ? (float)$selection['price'] : 0.0,
312313
'selection_qty' => (isset($selection['default_qty'])) ? (float)$selection['default_qty'] : 1.0,
313-
'selection_can_change_qty' => 1,
314+
'selection_can_change_qty' => isset($selection['can_change_qty'])
315+
? ($selection['can_change_qty'] ? 1 : 0) : 1,
314316
];
315317
if (isset($selection['selection_id'])) {
316318
$populatedSelection['selection_id'] = $selection['selection_id'];

app/code/Magento/BundleImportExport/Test/Unit/Model/Export/Product/RowCustomizerTest.php

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,20 @@ protected function setUp()
105105
);
106106
$this->selection = $this->createPartialMock(
107107
\Magento\Catalog\Model\Product::class,
108-
['getSku', 'getSelectionPriceValue', 'getIsDefault', 'getSelectionQty', 'getSelectionPriceType']
108+
[
109+
'getSku',
110+
'getSelectionPriceValue',
111+
'getIsDefault',
112+
'getSelectionQty',
113+
'getSelectionPriceType',
114+
'getSelectionCanChangeQty'
115+
]
109116
);
110117
$this->selection->expects($this->any())->method('getSku')->willReturn(1);
111118
$this->selection->expects($this->any())->method('getSelectionPriceValue')->willReturn(1);
112119
$this->selection->expects($this->any())->method('getSelectionQty')->willReturn(1);
113120
$this->selection->expects($this->any())->method('getSelectionPriceType')->willReturn(1);
121+
$this->selection->expects($this->any())->method('getSelectionCanChangeQty')->willReturn(1);
114122
$this->selectionsCollection = $this->createPartialMock(
115123
\Magento\Bundle\Model\ResourceModel\Selection\Collection::class,
116124
['getIterator', 'addAttributeToSort']
@@ -168,6 +176,19 @@ public function testAddData()
168176
'additional_attributes' => $attributes
169177
];
170178
$preparedRow = $preparedData->addData($dataRow, 1);
179+
180+
$bundleValues = [
181+
'name=title',
182+
'type=1',
183+
'required=1',
184+
'sku=1',
185+
'price=1',
186+
'default=',
187+
'default_qty=1',
188+
'price_type=percent',
189+
'can_change_qty=1',
190+
];
191+
171192
$expected = [
172193
'sku' => 'sku1',
173194
'additional_attributes' => 'attribute=1,attribute2="Text",attribute3=One,Two,Three',
@@ -176,7 +197,7 @@ public function testAddData()
176197
'bundle_sku_type' => 'fixed',
177198
'bundle_price_view' => 'As low as',
178199
'bundle_weight_type' => 'fixed',
179-
'bundle_values' => 'name=title,type=1,required=1,sku=1,price=1,default=,default_qty=1,price_type=percent'
200+
'bundle_values' => implode(',', $bundleValues)
180201
];
181202
$this->assertEquals($expected, $preparedRow);
182203
}

app/code/Magento/Deploy/Console/ConsoleLogger.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ class ConsoleLogger extends AbstractLogger
8282
LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL,
8383
LogLevel::ERROR => OutputInterface::VERBOSITY_NORMAL,
8484
LogLevel::WARNING => OutputInterface::VERBOSITY_NORMAL,
85-
LogLevel::NOTICE => OutputInterface::VERBOSITY_VERBOSE,
86-
LogLevel::INFO => OutputInterface::VERBOSITY_VERY_VERBOSE,
85+
LogLevel::NOTICE => OutputInterface::VERBOSITY_NORMAL,
86+
LogLevel::INFO => OutputInterface::VERBOSITY_VERBOSE,
8787
LogLevel::DEBUG => OutputInterface::VERBOSITY_DEBUG
8888
];
8989

app/code/Magento/Deploy/Process/Queue.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public function process()
161161
foreach ($packages as $name => $packageJob) {
162162
$this->assertAndExecute($name, $packages, $packageJob);
163163
}
164-
$this->logger->notice('.');
164+
$this->logger->info('.');
165165
sleep(3);
166166
foreach ($this->inProgress as $name => $package) {
167167
if ($this->isDeployed($package)) {
@@ -214,7 +214,7 @@ private function awaitForAllProcesses()
214214
unset($this->inProgress[$name]);
215215
}
216216
}
217-
$this->logger->notice('.');
217+
$this->logger->info('.');
218218
sleep(5);
219219
}
220220
if ($this->isCanBeParalleled()) {

app/code/Magento/Deploy/Service/DeployPackage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ private function register(Package $package, PackageFile $file = null, $skipLoggi
267267
$this->deployStaticFile->writeTmpFile('info.json', $package->getPath(), json_encode($info));
268268

269269
if (!$skipLogging) {
270-
$this->logger->notice($logMessage);
270+
$this->logger->info($logMessage);
271271
}
272272
}
273273
}

app/code/Magento/GoogleAnalytics/Block/Ga.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ public function getOrdersTrackingCode()
128128
'price': '%s',
129129
'quantity': %s
130130
});",
131-
$this->escapeJs($item->getSku()),
132-
$this->escapeJs($item->getName()),
131+
$this->escapeJsQuote($item->getSku()),
132+
$this->escapeJsQuote($item->getName()),
133133
$item->getPrice(),
134134
$item->getQtyOrdered()
135135
);
@@ -144,7 +144,7 @@ public function getOrdersTrackingCode()
144144
'shipping': '%s'
145145
});",
146146
$order->getIncrementId(),
147-
$this->escapeJs($this->_storeManager->getStore()->getFrontendName()),
147+
$this->escapeJsQuote($this->_storeManager->getStore()->getFrontendName()),
148148
$order->getGrandTotal(),
149149
$order->getTaxAmount(),
150150
$order->getShippingAmount()
@@ -234,15 +234,15 @@ public function getOrdersTrackingData()
234234
foreach ($collection as $order) {
235235
foreach ($order->getAllVisibleItems() as $item) {
236236
$result['products'][] = [
237-
'id' => $this->escapeJs($item->getSku()),
238-
'name' => $this->escapeJs($item->getName()),
237+
'id' => $this->escapeJsQuote($item->getSku()),
238+
'name' => $this->escapeJsQuote($item->getName()),
239239
'price' => $item->getPrice(),
240240
'quantity' => $item->getQtyOrdered(),
241241
];
242242
}
243243
$result['orders'][] = [
244244
'id' => $order->getIncrementId(),
245-
'affiliation' => $this->escapeJs($this->_storeManager->getStore()->getFrontendName()),
245+
'affiliation' => $this->escapeJsQuote($this->_storeManager->getStore()->getFrontendName()),
246246
'revenue' => $order->getGrandTotal(),
247247
'tax' => $order->getTaxAmount(),
248248
'shipping' => $order->getShippingAmount(),

app/code/Magento/Tax/view/frontend/templates/checkout/discount.phtml

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
</tr>
3939

4040
<?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary() && $_value != 0): ?>
41-
<?php $isTop = 1; ?>
4241
<?php foreach ($block->getTotal()->getFullInfo() as $info): ?>
4342
<?php if (isset($info['hidden']) && $info['hidden']) {
4443
continue;
@@ -64,7 +63,6 @@
6463
<?php endif; ?>
6564
</tr>
6665
<?php $isFirst = 0; ?>
67-
<?php $isTop = 0; ?>
6866
<?php endforeach; ?>
6967
<?php endforeach; ?>
7068
<?php endif;?>

dev/tests/acceptance/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"name": "magento/magento2ce-functional-tests",
32
"description": "Magento 2 (Open Source) Functional Tests",
43
"type": "project",
54
"version": "1.0.0-dev",

0 commit comments

Comments
 (0)