Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 2a389b0

Browse files
author
Stanislav Idolov
authored
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - magento/magento2#18750: issue #18655 fixed: Magento 2.3.0-beta18: ReflectionException on Backend -> Stores -> Configuration -> Services -> OAuth page (by @maheshWebkul721) - magento/magento2#18970: Added default value(y) for confirmation question (by @aheadWorks) - magento/magento2#18946: Fixed annotations (by @sreichel) - magento/magento2#18940: [Forwardport] Fixed-Global-search icon misaligned (by @speedy008) - magento/magento2#17805: Optimize code to remove phpmd suppress warnings (by @arnoudhgz) - magento-engcom/import-export-improvements#149: Removed parameter from constructor inside CustomTest class (by @denispapec) - magento/magento2#18894: Fix spelling in AsynchronousOperations and Backend (by @hugovk) - magento/magento2#18850: Remove php.ini sample (by @wiardvanrij) - magento/magento2#18807: catalog:images:resize total images count calculates incorrectly #18387: (by @vpodorozh) - magento/magento2#18772: Remove unnecesary "header" block redeclaration (by @samuel27m) - magento/magento2#18578: Special price date from issue resolve (by @hiren0241) - magento/magento2#18520: [Forwardport] #4942 and bundle checkbox bug (by @gelanivishal) Fixed GitHub Issues: - magento/magento2#18655: Magento 2.3.0-beta18: ReflectionException on Backend -> Stores -> Configuration -> Services -> OAuth page (reported by @jhruehl) has been fixed in magento/magento2#18750 by @maheshWebkul721 in 2.3-develop branch Related commits: 1. 78accc5 - magento/magento2#18965: 2.3-beta32: DB credentials are not updated in non-interactive mode by bin/magento setup:config:set (reported by @aheadWorks) has been fixed in magento/magento2#18970 by @aheadWorks in 2.3-develop branch Related commits: 1. 3bfe826 - magento/magento2#18913: Global-search icon misaligned (reported by @speedy008) has been fixed in magento/magento2#18940 by @speedy008 in 2.3-develop branch Related commits: 1. b751349 - magento/magento2#18387: catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue (reported by @gwharton) has been fixed in magento/magento2#18807 by @vpodorozh in 2.3-develop branch Related commits: 1. 6a6079d 2. 466daaa 3. e1a1c7b 4. f6b0a2a 5. 9e9715b 6. 546e7ce 7. f38a4fc 8. 12f8396 9. c95ce3c 10. c1aa5bc - magento/magento2#18158: 2.2.6 "Special price date from" Failed to parse time string (reported by @Cristiano81) has been fixed in magento/magento2#18578 by @hiren0241 in 2.3-develop branch Related commits: 1. 4e382cc 2. fd8a5a9 3. 88592fa - magento/magento2#4942: On editing a Bundle product from shopping cart the user defined quantities of the options are overwritten (reported by @densen45) has been fixed in magento/magento2#18520 by @gelanivishal in 2.3-develop branch Related commits: 1. e210b70 2. 53f5942 3. 8050d50 4. 0bd75c8
2 parents b831a20 + a38250e commit 2a389b0

File tree

29 files changed

+494
-164
lines changed

29 files changed

+494
-164
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ To get detailed information about changes in Magento 2.1.0, please visit [Magent
157157
* Updated styles
158158
* Sample Data:
159159
* Improved sample data installation UX
160-
* Updated sample data with Product Heros, color swatches, MAP and rule based product relations
160+
* Updated sample data with Product Heroes, color swatches, MAP and rule based product relations
161161
* Improved sample data upgrade flow
162162
* Added the ability to log errors and set the error flag during sample data installation
163163
* Various improvements:
@@ -2284,7 +2284,7 @@ Tests:
22842284
* Fixed an issue where no results were found for Coupons reports
22852285
* Fixed an issue with incremental Qty setting
22862286
* Fixed an issue with allowing importing of negative weight values
2287-
* Fixed an issue with Inventory - Only X left Treshold being not dependent on Qty for Item's Status to Become Out of Stock
2287+
* Fixed an issue with Inventory - Only X left Threshold being not dependent on Qty for Item's Status to Become Out of Stock
22882288
* Fixed an issue where the "Catalog Search Index index was rebuilt." message was displayed when reindexing the Catalog Search index
22892289
* Search module:
22902290
* Integrated the Search library to the advanced search functionality
@@ -2706,7 +2706,7 @@ Tests:
27062706
* Ability to support extensible service data objects
27072707
* No Code Duplication in Root Templates
27082708
* Fixed bugs:
2709-
* Persistance session application. Loggin out the customer
2709+
* Persistence session application. Logging out the customer
27102710
* Placing the order with two terms and conditions
27112711
* Saving of custom option by service catalogProductCustomOptionsWriteServiceV1
27122712
* Placing the order on frontend if enter in the street address line 1 and 2 255 symbols
@@ -2965,7 +2965,7 @@ Tests:
29652965
* Fixed an issue with incorrect items label for the cases when there are more than one item in the category
29662966
* Fixed an issue when configurable product was out of stock in Google Shopping while being in stock in the Magento backend
29672967
* Fixed an issue when swipe gesture in menu widget was not supported on mobile
2968-
* Fixed an issue when it was impossible to enter alpha-numeric zip code on the stage of estimating shipping and tax rates
2968+
* Fixed an issue when it was impossible to enter alphanumeric zip code on the stage of estimating shipping and tax rates
29692969
* Fixed an issue when custom price was not applied when editing an order
29702970
* Fixed an issue when items were not returned to stock after unsuccessful order was placed
29712971
* Fixed an issue when error message appeared "Cannot save the credit memo” while creating credit memo

app/code/Magento/AsynchronousOperations/Controller/Adminhtml/Bulk/Details.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
namespace Magento\AsynchronousOperations\Controller\Adminhtml\Bulk;
77

88
/**
9-
* Class View Opertion Details Controller
9+
* Class View Operation Details Controller
1010
*/
11-
class Details extends \Magento\Backend\App\Action
11+
class Details extends \Magento\Backend\App\Action implements \Magento\Framework\App\Action\HttpGetActionInterface
1212
{
1313
/**
1414
* @var \Magento\Framework\View\Result\PageFactory

app/code/Magento/Backend/App/Request/BackendValidator.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ public function __construct(
7777
}
7878

7979
/**
80+
* Validate request
81+
*
8082
* @param RequestInterface $request
8183
* @param ActionInterface $action
8284
*
@@ -115,6 +117,8 @@ private function validateRequest(
115117
}
116118

117119
/**
120+
* Create exception
121+
*
118122
* @param RequestInterface $request
119123
* @param ActionInterface $action
120124
*
@@ -166,7 +170,7 @@ public function validate(
166170
ActionInterface $action
167171
): void {
168172
if ($action instanceof AbstractAction) {
169-
//Abstract Action has build-in validation.
173+
//Abstract Action has built-in validation.
170174
if (!$action->_processUrlKeys()) {
171175
throw new InvalidRequestException($action->getResponse());
172176
}

app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Theme.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
*/
1010
namespace Magento\Backend\Block\Widget\Grid\Column\Filter;
1111

12+
/**
13+
* Theme grid filter
14+
*/
1215
class Theme extends \Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilter
1316
{
1417
/**
@@ -54,7 +57,8 @@ public function getHtml()
5457
}
5558

5659
/**
57-
* Retrieve options setted in column.
60+
* Retrieve options set in column.
61+
*
5862
* Or load if options was not set.
5963
*
6064
* @return array

app/code/Magento/Backend/Block/Widget/Tabs.php

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
use Magento\Backend\Block\Widget\Tab\TabInterface;
99

1010
/**
11+
* Tabs widget
12+
*
1113
* @api
1214
* @SuppressWarnings(PHPMD.NumberOfChildren)
1315
* @since 100.0.2
@@ -178,6 +180,8 @@ protected function _addTabByName($tab, $tabId)
178180
}
179181

180182
/**
183+
* Get active tab id
184+
*
181185
* @return string
182186
*/
183187
public function getActiveTabId()
@@ -187,6 +191,7 @@ public function getActiveTabId()
187191

188192
/**
189193
* Set Active Tab
194+
*
190195
* Tab has to be not hidden and can show
191196
*
192197
* @param string $tabId
@@ -231,7 +236,7 @@ protected function _setActiveTab($tabId)
231236
}
232237

233238
/**
234-
* {@inheritdoc}
239+
* @inheritdoc
235240
*/
236241
protected function _beforeToHtml()
237242
{
@@ -282,6 +287,8 @@ private function reorderTabs()
282287
}
283288

284289
/**
290+
* Apply tabs order
291+
*
285292
* @param array $orderByPosition
286293
* @param array $orderByIdentity
287294
*
@@ -294,7 +301,7 @@ private function applyTabsCorrectOrder(array $orderByPosition, array $orderByIde
294301
/**
295302
* Rearrange the positions by using the after tag for each tab.
296303
*
297-
* @var integer $position
304+
* @var int $position
298305
* @var TabInterface $tab
299306
*/
300307
foreach ($orderByPosition as $position => $tab) {
@@ -338,6 +345,8 @@ private function finalTabsSortOrder(array $orderByPosition)
338345
}
339346

340347
/**
348+
* Get js object name
349+
*
341350
* @return string
342351
*/
343352
public function getJsObjectName()
@@ -346,6 +355,8 @@ public function getJsObjectName()
346355
}
347356

348357
/**
358+
* Get tabs ids
359+
*
349360
* @return string[]
350361
*/
351362
public function getTabsIds()
@@ -358,6 +369,8 @@ public function getTabsIds()
358369
}
359370

360371
/**
372+
* Get tab id
373+
*
361374
* @param \Magento\Framework\DataObject|TabInterface $tab
362375
* @param bool $withPrefix
363376
* @return string
@@ -371,6 +384,8 @@ public function getTabId($tab, $withPrefix = true)
371384
}
372385

373386
/**
387+
* CVan show tab
388+
*
374389
* @param \Magento\Framework\DataObject|TabInterface $tab
375390
* @return bool
376391
*/
@@ -383,6 +398,8 @@ public function canShowTab($tab)
383398
}
384399

385400
/**
401+
* Get tab is hidden
402+
*
386403
* @param \Magento\Framework\DataObject|TabInterface $tab
387404
* @return bool
388405
* @SuppressWarnings(PHPMD.BooleanGetMethodName)
@@ -396,6 +413,8 @@ public function getTabIsHidden($tab)
396413
}
397414

398415
/**
416+
* Get tab url
417+
*
399418
* @param \Magento\Framework\DataObject|TabInterface $tab
400419
* @return string
401420
*/
@@ -414,6 +433,8 @@ public function getTabUrl($tab)
414433
}
415434

416435
/**
436+
* Get tab title
437+
*
417438
* @param \Magento\Framework\DataObject|TabInterface $tab
418439
* @return string
419440
*/
@@ -426,6 +447,8 @@ public function getTabTitle($tab)
426447
}
427448

428449
/**
450+
* Get tab class
451+
*
429452
* @param \Magento\Framework\DataObject|TabInterface $tab
430453
* @return string
431454
*/
@@ -441,6 +464,8 @@ public function getTabClass($tab)
441464
}
442465

443466
/**
467+
* Get tab label
468+
*
444469
* @param \Magento\Framework\DataObject|TabInterface $tab
445470
* @return string
446471
*/
@@ -453,6 +478,8 @@ public function getTabLabel($tab)
453478
}
454479

455480
/**
481+
* Get tab content
482+
*
456483
* @param \Magento\Framework\DataObject|TabInterface $tab
457484
* @return string
458485
*/
@@ -468,7 +495,8 @@ public function getTabContent($tab)
468495
}
469496

470497
/**
471-
* Mark tabs as dependant of each other
498+
* Mark tabs as dependent of each other
499+
*
472500
* Arbitrary number of tabs can be specified, but at least two
473501
*
474502
* @param string $tabOneId

app/code/Magento/Backend/Console/Command/AbstractCacheCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@
1111
use Symfony\Component\Console\Input\InputOption;
1212

1313
/**
14+
* Abstract cache command
15+
*
1416
* @api
1517
* @since 100.0.2
1618
*/
1719
abstract class AbstractCacheCommand extends Command
1820
{
1921
/**
20-
* Input option bootsrap
22+
* Input option bootstrap
2123
*/
2224
const INPUT_KEY_BOOTSTRAP = 'bootstrap';
2325

@@ -40,7 +42,7 @@ public function __construct(Manager $cacheManager)
4042
}
4143

4244
/**
43-
* {@inheritdoc}
45+
* @inheritdoc
4446
*/
4547
protected function configure()
4648
{

app/code/Magento/Backend/Test/Unit/Model/Menu/ConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,6 @@ public function testGetMenuGenericExceptionIsNotLogged()
168168
} catch (\Exception $e) {
169169
return;
170170
}
171-
$this->fail("Generic \Exception was not throwed");
171+
$this->fail("Generic \Exception was not thrown");
172172
}
173173
}

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
<field id="*/*/template_hints_storefront">1</field>
130130
<field id="*/*/template_hints_storefront_show_with_parameter">1</field>
131131
</depends>
132-
<comment>Add the following paramater to the URL to show template hints ?templatehints=[parameter_value]</comment>
132+
<comment>Add the following parameter to the URL to show template hints ?templatehints=[parameter_value]</comment>
133133
</field>
134134
<field id="template_hints_admin" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
135135
<label>Enabled Template Path Hints for Admin</label>

app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
use Magento\Bundle\Model\Option;
99
use Magento\Catalog\Model\Product;
10+
use Magento\Framework\DataObject;
1011

1112
/**
1213
* Catalog bundle product info block
@@ -170,7 +171,7 @@ public function getJsonConfig()
170171

171172
$defaultValues = [];
172173
$preConfiguredFlag = $currentProduct->hasPreconfiguredValues();
173-
/** @var \Magento\Framework\DataObject|null $preConfiguredValues */
174+
/** @var DataObject|null $preConfiguredValues */
174175
$preConfiguredValues = $preConfiguredFlag ? $currentProduct->getPreconfiguredValues() : null;
175176

176177
$position = 0;
@@ -193,12 +194,13 @@ public function getJsonConfig()
193194
$options[$optionId]['selections'][$configValue]['qty'] = $configQty;
194195
}
195196
}
197+
$options = $this->processOptions($optionId, $options, $preConfiguredValues);
196198
}
197199
$position++;
198200
}
199201
$config = $this->getConfigData($currentProduct, $options);
200202

201-
$configObj = new \Magento\Framework\DataObject(
203+
$configObj = new DataObject(
202204
[
203205
'config' => $config,
204206
]
@@ -403,4 +405,30 @@ private function getConfigData(Product $product, array $options)
403405
];
404406
return $config;
405407
}
408+
409+
/**
410+
* Set preconfigured quantities and selections to options.
411+
*
412+
* @param string $optionId
413+
* @param array $options
414+
* @param DataObject $preConfiguredValues
415+
* @return array
416+
*/
417+
private function processOptions(string $optionId, array $options, DataObject $preConfiguredValues)
418+
{
419+
$preConfiguredQtys = $preConfiguredValues->getData("bundle_option_qty/${optionId}") ?? [];
420+
$selections = $options[$optionId]['selections'];
421+
array_walk($selections, function (&$selection, $selectionId) use ($preConfiguredQtys) {
422+
if (is_array($preConfiguredQtys) && isset($preConfiguredQtys[$selectionId])) {
423+
$selection['qty'] = $preConfiguredQtys[$selectionId];
424+
} else {
425+
if ((int)$preConfiguredQtys > 0) {
426+
$selection['qty'] = $preConfiguredQtys;
427+
}
428+
}
429+
});
430+
$options[$optionId]['selections'] = $selections;
431+
432+
return $options;
433+
}
406434
}

app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ protected function _getSelectedOptions()
167167
*/
168168
protected function assignSelection(\Magento\Bundle\Model\Option $option, $selectionId)
169169
{
170-
if ($selectionId && $option->getSelectionById($selectionId)) {
170+
if (is_array($selectionId)) {
171+
$this->_selectedOptions = $selectionId;
172+
} else if ($selectionId && $option->getSelectionById($selectionId)) {
171173
$this->_selectedOptions = $selectionId;
172174
} elseif (!$option->getRequired()) {
173175
$this->_selectedOptions = 'None';
@@ -228,6 +230,8 @@ public function getProduct()
228230
}
229231

230232
/**
233+
* Get bundle option price title.
234+
*
231235
* @param \Magento\Catalog\Model\Product $selection
232236
* @param bool $includeContainer
233237
* @return string

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontEditBundleProductTest.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,8 @@
9494
<click stepKey="clickEdit" selector="{{CheckoutCartProductSection.nthEditButton('1')}}"/>
9595
<waitForPageLoad stepKey="waitForStorefront2"/>
9696

97-
<!-- Choose both of the options on the storefront -->
98-
<click stepKey="selectFirstBundleOption2" selector="{{StorefrontBundledSection.nthBundledOption('1','1')}}"/>
99-
<click stepKey="selectSecondBundleOption2" selector="{{StorefrontBundledSection.nthBundledOption('1','2')}}"/>
97+
<!-- Check second one option to choose both of the options on the storefront -->
98+
<click selector="{{StorefrontBundledSection.nthBundledOption('1','2')}}" stepKey="selectSecondBundleOption2"/>
10099

101100
<waitForPageLoad stepKey="waitForPriceUpdate3"/>
102101
<see stepKey="seeDoublePrice" selector="{{StorefrontBundledSection.configuredPrice}}" userInput="2,460.00"/>

0 commit comments

Comments
 (0)