Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.3-develop
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Stanislav Idolov authored Nov 5, 2018
2 parents b831a20 + a38250e commit 2a389b0
Show file tree
Hide file tree
Showing 29 changed files with 494 additions and 164 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ To get detailed information about changes in Magento 2.1.0, please visit [Magent
* Updated styles
* Sample Data:
* Improved sample data installation UX
* Updated sample data with Product Heros, color swatches, MAP and rule based product relations
* Updated sample data with Product Heroes, color swatches, MAP and rule based product relations
* Improved sample data upgrade flow
* Added the ability to log errors and set the error flag during sample data installation
* Various improvements:
Expand Down Expand Up @@ -2284,7 +2284,7 @@ Tests:
* Fixed an issue where no results were found for Coupons reports
* Fixed an issue with incremental Qty setting
* Fixed an issue with allowing importing of negative weight values
* Fixed an issue with Inventory - Only X left Treshold being not dependent on Qty for Item's Status to Become Out of Stock
* Fixed an issue with Inventory - Only X left Threshold being not dependent on Qty for Item's Status to Become Out of Stock
* Fixed an issue where the "Catalog Search Index index was rebuilt." message was displayed when reindexing the Catalog Search index
* Search module:
* Integrated the Search library to the advanced search functionality
Expand Down Expand Up @@ -2706,7 +2706,7 @@ Tests:
* Ability to support extensible service data objects
* No Code Duplication in Root Templates
* Fixed bugs:
* Persistance session application. Loggin out the customer
* Persistence session application. Logging out the customer
* Placing the order with two terms and conditions
* Saving of custom option by service catalogProductCustomOptionsWriteServiceV1
* Placing the order on frontend if enter in the street address line 1 and 2 255 symbols
Expand Down Expand Up @@ -2965,7 +2965,7 @@ Tests:
* Fixed an issue with incorrect items label for the cases when there are more than one item in the category
* Fixed an issue when configurable product was out of stock in Google Shopping while being in stock in the Magento backend
* Fixed an issue when swipe gesture in menu widget was not supported on mobile
* Fixed an issue when it was impossible to enter alpha-numeric zip code on the stage of estimating shipping and tax rates
* Fixed an issue when it was impossible to enter alphanumeric zip code on the stage of estimating shipping and tax rates
* Fixed an issue when custom price was not applied when editing an order
* Fixed an issue when items were not returned to stock after unsuccessful order was placed
* Fixed an issue when error message appeared "Cannot save the credit memo” while creating credit memo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
namespace Magento\AsynchronousOperations\Controller\Adminhtml\Bulk;

/**
* Class View Opertion Details Controller
* Class View Operation Details Controller
*/
class Details extends \Magento\Backend\App\Action
class Details extends \Magento\Backend\App\Action implements \Magento\Framework\App\Action\HttpGetActionInterface
{
/**
* @var \Magento\Framework\View\Result\PageFactory
Expand Down
6 changes: 5 additions & 1 deletion app/code/Magento/Backend/App/Request/BackendValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public function __construct(
}

/**
* Validate request
*
* @param RequestInterface $request
* @param ActionInterface $action
*
Expand Down Expand Up @@ -115,6 +117,8 @@ private function validateRequest(
}

/**
* Create exception
*
* @param RequestInterface $request
* @param ActionInterface $action
*
Expand Down Expand Up @@ -166,7 +170,7 @@ public function validate(
ActionInterface $action
): void {
if ($action instanceof AbstractAction) {
//Abstract Action has build-in validation.
//Abstract Action has built-in validation.
if (!$action->_processUrlKeys()) {
throw new InvalidRequestException($action->getResponse());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
*/
namespace Magento\Backend\Block\Widget\Grid\Column\Filter;

/**
* Theme grid filter
*/
class Theme extends \Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilter
{
/**
Expand Down Expand Up @@ -54,7 +57,8 @@ public function getHtml()
}

/**
* Retrieve options setted in column.
* Retrieve options set in column.
*
* Or load if options was not set.
*
* @return array
Expand Down
34 changes: 31 additions & 3 deletions app/code/Magento/Backend/Block/Widget/Tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
use Magento\Backend\Block\Widget\Tab\TabInterface;

/**
* Tabs widget
*
* @api
* @SuppressWarnings(PHPMD.NumberOfChildren)
* @since 100.0.2
Expand Down Expand Up @@ -178,6 +180,8 @@ protected function _addTabByName($tab, $tabId)
}

/**
* Get active tab id
*
* @return string
*/
public function getActiveTabId()
Expand All @@ -187,6 +191,7 @@ public function getActiveTabId()

/**
* Set Active Tab
*
* Tab has to be not hidden and can show
*
* @param string $tabId
Expand Down Expand Up @@ -231,7 +236,7 @@ protected function _setActiveTab($tabId)
}

/**
* {@inheritdoc}
* @inheritdoc
*/
protected function _beforeToHtml()
{
Expand Down Expand Up @@ -282,6 +287,8 @@ private function reorderTabs()
}

/**
* Apply tabs order
*
* @param array $orderByPosition
* @param array $orderByIdentity
*
Expand All @@ -294,7 +301,7 @@ private function applyTabsCorrectOrder(array $orderByPosition, array $orderByIde
/**
* Rearrange the positions by using the after tag for each tab.
*
* @var integer $position
* @var int $position
* @var TabInterface $tab
*/
foreach ($orderByPosition as $position => $tab) {
Expand Down Expand Up @@ -338,6 +345,8 @@ private function finalTabsSortOrder(array $orderByPosition)
}

/**
* Get js object name
*
* @return string
*/
public function getJsObjectName()
Expand All @@ -346,6 +355,8 @@ public function getJsObjectName()
}

/**
* Get tabs ids
*
* @return string[]
*/
public function getTabsIds()
Expand All @@ -358,6 +369,8 @@ public function getTabsIds()
}

/**
* Get tab id
*
* @param \Magento\Framework\DataObject|TabInterface $tab
* @param bool $withPrefix
* @return string
Expand All @@ -371,6 +384,8 @@ public function getTabId($tab, $withPrefix = true)
}

/**
* CVan show tab
*
* @param \Magento\Framework\DataObject|TabInterface $tab
* @return bool
*/
Expand All @@ -383,6 +398,8 @@ public function canShowTab($tab)
}

/**
* Get tab is hidden
*
* @param \Magento\Framework\DataObject|TabInterface $tab
* @return bool
* @SuppressWarnings(PHPMD.BooleanGetMethodName)
Expand All @@ -396,6 +413,8 @@ public function getTabIsHidden($tab)
}

/**
* Get tab url
*
* @param \Magento\Framework\DataObject|TabInterface $tab
* @return string
*/
Expand All @@ -414,6 +433,8 @@ public function getTabUrl($tab)
}

/**
* Get tab title
*
* @param \Magento\Framework\DataObject|TabInterface $tab
* @return string
*/
Expand All @@ -426,6 +447,8 @@ public function getTabTitle($tab)
}

/**
* Get tab class
*
* @param \Magento\Framework\DataObject|TabInterface $tab
* @return string
*/
Expand All @@ -441,6 +464,8 @@ public function getTabClass($tab)
}

/**
* Get tab label
*
* @param \Magento\Framework\DataObject|TabInterface $tab
* @return string
*/
Expand All @@ -453,6 +478,8 @@ public function getTabLabel($tab)
}

/**
* Get tab content
*
* @param \Magento\Framework\DataObject|TabInterface $tab
* @return string
*/
Expand All @@ -468,7 +495,8 @@ public function getTabContent($tab)
}

/**
* Mark tabs as dependant of each other
* Mark tabs as dependent of each other
*
* Arbitrary number of tabs can be specified, but at least two
*
* @param string $tabOneId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
use Symfony\Component\Console\Input\InputOption;

/**
* Abstract cache command
*
* @api
* @since 100.0.2
*/
abstract class AbstractCacheCommand extends Command
{
/**
* Input option bootsrap
* Input option bootstrap
*/
const INPUT_KEY_BOOTSTRAP = 'bootstrap';

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

/**
* {@inheritdoc}
* @inheritdoc
*/
protected function configure()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,6 @@ public function testGetMenuGenericExceptionIsNotLogged()
} catch (\Exception $e) {
return;
}
$this->fail("Generic \Exception was not throwed");
$this->fail("Generic \Exception was not thrown");
}
}
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<field id="*/*/template_hints_storefront">1</field>
<field id="*/*/template_hints_storefront_show_with_parameter">1</field>
</depends>
<comment>Add the following paramater to the URL to show template hints ?templatehints=[parameter_value]</comment>
<comment>Add the following parameter to the URL to show template hints ?templatehints=[parameter_value]</comment>
</field>
<field id="template_hints_admin" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Enabled Template Path Hints for Admin</label>
Expand Down
32 changes: 30 additions & 2 deletions app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

use Magento\Bundle\Model\Option;
use Magento\Catalog\Model\Product;
use Magento\Framework\DataObject;

/**
* Catalog bundle product info block
Expand Down Expand Up @@ -170,7 +171,7 @@ public function getJsonConfig()

$defaultValues = [];
$preConfiguredFlag = $currentProduct->hasPreconfiguredValues();
/** @var \Magento\Framework\DataObject|null $preConfiguredValues */
/** @var DataObject|null $preConfiguredValues */
$preConfiguredValues = $preConfiguredFlag ? $currentProduct->getPreconfiguredValues() : null;

$position = 0;
Expand All @@ -193,12 +194,13 @@ public function getJsonConfig()
$options[$optionId]['selections'][$configValue]['qty'] = $configQty;
}
}
$options = $this->processOptions($optionId, $options, $preConfiguredValues);
}
$position++;
}
$config = $this->getConfigData($currentProduct, $options);

$configObj = new \Magento\Framework\DataObject(
$configObj = new DataObject(
[
'config' => $config,
]
Expand Down Expand Up @@ -403,4 +405,30 @@ private function getConfigData(Product $product, array $options)
];
return $config;
}

/**
* Set preconfigured quantities and selections to options.
*
* @param string $optionId
* @param array $options
* @param DataObject $preConfiguredValues
* @return array
*/
private function processOptions(string $optionId, array $options, DataObject $preConfiguredValues)
{
$preConfiguredQtys = $preConfiguredValues->getData("bundle_option_qty/${optionId}") ?? [];
$selections = $options[$optionId]['selections'];
array_walk($selections, function (&$selection, $selectionId) use ($preConfiguredQtys) {
if (is_array($preConfiguredQtys) && isset($preConfiguredQtys[$selectionId])) {
$selection['qty'] = $preConfiguredQtys[$selectionId];
} else {
if ((int)$preConfiguredQtys > 0) {
$selection['qty'] = $preConfiguredQtys;
}
}
});
$options[$optionId]['selections'] = $selections;

return $options;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ protected function _getSelectedOptions()
*/
protected function assignSelection(\Magento\Bundle\Model\Option $option, $selectionId)
{
if ($selectionId && $option->getSelectionById($selectionId)) {
if (is_array($selectionId)) {
$this->_selectedOptions = $selectionId;
} else if ($selectionId && $option->getSelectionById($selectionId)) {
$this->_selectedOptions = $selectionId;
} elseif (!$option->getRequired()) {
$this->_selectedOptions = 'None';
Expand Down Expand Up @@ -228,6 +230,8 @@ public function getProduct()
}

/**
* Get bundle option price title.
*
* @param \Magento\Catalog\Model\Product $selection
* @param bool $includeContainer
* @return string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@
<click stepKey="clickEdit" selector="{{CheckoutCartProductSection.nthEditButton('1')}}"/>
<waitForPageLoad stepKey="waitForStorefront2"/>

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

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

0 comments on commit 2a389b0

Please sign in to comment.