Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.3-develop Minor Fixes
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - #21054: Add missing php doc cookie class (by @XxXgeoXxX)
 - #21084: Removing extra comma from construct params (by @williankeller)
 - #20829: Fixed issue #20828 Newsletter Problem Grid Filter issue (by @GovindaSharma)
 - #21047: [Forwardport] resolve typo errors for js record.js (by @mage2pratik)
 - #21048: [SendFriend] Covering the Send to friend by integration tests (by @eduard13)
 - #21033: Add missing php doc params to ConvertSerializedDataToJson class constructor (by @maddumarala)
 - #20155: My-account-page-Recently-Ordered-check-box-misaligned-on-tab-portrait� (by @ajay2jcommerce)
 - #21036: Added RewriteBase directive template in .htaccess file into pub/media folder (by @ccasciotti)
 - #21035: Issue Fixed #21034: Invalid return type in docstring (by @milindsingh)
 - #18981: Fix for currency update in crontab area (by @denispapec)
 - #21028: [Checkout] Covering the successfully adding a valid coupon to cart by an integra� (by @eduard13)
 - #21029: Add missing php doc engineresolver class (by @dominicfernando)
 - #20990: Solve custom option dropdown issue (by @dharmendra-wagento)
 - #20995: Removing comma from construct params (by @williankeller)
 - #20817: Orders-and-Returns-layout-not-proper (by @amol2jcommerce)
 - #20801: Fixes-for-account-my-recent-reviews-alignment (by @priti2jcommerce)
 - #20820: [Reports] Fixed refreshing the reports statistics (by @eduard13)
 - #20962: Extra space from left in top message section (Notification section) (by @cedarvinda)
 - #20874: Email to a Friend form not full responsive and remove link not positi� (by @cedarvinda)
 - #20913: Solved swagger response of product attribute option is_default (by @hiren-wagento)
 - #20914: Fixed issue #20911 In admin login password forgot password page wrong css used to make it vertially aling middle  (by @GovindaSharma)
 - #20967: Fixed redirection issue in Admin-> Content -> Schedule (by @dominicfernando)
 - #20548: Fixes incorrect country code being used for Greek VAT numbers, should� (by @hostep)
 - #20930: Fixed Issue #20908 error message icon alignment mm19in (by @kunj1988)
 - #20956: Admin store view label not alignment (by @amol2jcommerce)
 - #20936: Issue #20924 - fix Pending Reviews label, add menu for pending review� (by @dankhrapiyush)
 - #20907: Magento backend catalog cost without currency symbol (by @mage2pratik)
 - #20808: Adjust table for grouped products (by @mageho)
 - #20558: fixes-customer-information-wishlist-configurable-product-alignment (by @priti2jcommerce)


Fixed GitHub Issues:
 - #20828: Newsletter Problem Grid Filter issue (reported by @mohammadzakir) has been fixed in #20829 by @GovindaSharma in 2.3-develop branch
   Related commits:
     1. dd48394
     2. 8ea63dd
     3. 273d95a

 - #20143: My account page "Recently Ordered" check box misaligned on tab portrait view  (reported by @ajay2jcommerce) has been fixed in #20155 by @ajay2jcommerce in 2.3-develop branch
   Related commits:
     1. 5515f7e
     2. 15ddead
     3. 12c7e05
     4. 57df489

 - #21034: Magento\Framework\HTTP\PhpEnvironment\Request::getHeader() has incorrect return type in dockblock (reported by @kanduvisla) has been fixed in #21035 by @milindsingh in 2.3-develop branch
   Related commits:
     1. e64dbcb
     2. 666c63c

 - #18580: Currency rates not updated by crontab (reported by @jcourtei) has been fixed in #18981 by @denispapec in 2.3-develop branch
   Related commits:
     1. c0df2e4

 - #20989: Admin Customizable Options Dropdown sort_order issue (reported by @dharmendra-wagento) has been fixed in #20990 by @dharmendra-wagento in 2.3-develop branch
   Related commits:
     1. 734c440

 - #20816: Orders and Returns layout not proper (reported by @yashwant2jcommerce) has been fixed in #20817 by @amol2jcommerce in 2.3-develop branch
   Related commits:
     1. 604ab26

 - #20800: On account my recent reviews alignment issue (reported by @priti2jcommerce) has been fixed in #20801 by @priti2jcommerce in 2.3-develop branch
   Related commits:
     1. 3dc4f9b

 - #20819: [Reports] Refresh Reports Lifetime Statistics action redirects to 404 (reported by @eduard13) has been fixed in #20820 by @eduard13 in 2.3-develop branch
   Related commits:
     1. fd28eb0
     2. 8a276c1

 - #18525: Incorrect Swager Definition for eav-data-attribute-option-interface  (reported by @vetshopdeveloper) has been fixed in #20913 by @hiren-wagento in 2.3-develop branch
   Related commits:
     1. 1e77ebe

 - #20911: In admin login password forgot password page wrong css used to make it vertially aling middle  (reported by @cedarvinda) has been fixed in #20914 by @GovindaSharma in 2.3-develop branch
   Related commits:
     1. e92b9a3

 - #6960: Greek vat numbers cannot be validated (reported by @schnappenberger) has been fixed in #20548 by @hostep in 2.3-develop branch
   Related commits:
     1. 3ed5efb

 - #20908: Bundle product edit/add page error message icon alignment is not proper at 'Customizable Options'  (reported by @kunj1988) has been fixed in #20930 by @kunj1988 in 2.3-develop branch
   Related commits:
     1. b715afa

 - #20924: Reviews ACL issue - showing Reviews menu two times under System > User Roles > Add New Role > Role Resources (reported by @dankhrapiyush) has been fixed in #20936 by @dankhrapiyush in 2.3-develop branch
   Related commits:
     1. 01d68c6
     2. 0b5e0e2
     3. a4d81ca

 - #20906: Magento backend catalog "Cost" without currency symbol (reported by @mage2pratik) has been fixed in #20907 by @mage2pratik in 2.3-develop branch
   Related commits:
     1. 85beeec

 - #20760: Admin Customer configuraion in whishlist associated product for configurable product misalign (reported by @nainesh2jcommerce) has been fixed in #20558 by @priti2jcommerce in 2.3-develop branch
   Related commits:
     1. 7495afb
     2. 565f625
  • Loading branch information
magento-engcom-team authored Feb 12, 2019
2 parents 4e11084 + 48cfb71 commit 23bc18f
Show file tree
Hide file tree
Showing 39 changed files with 362 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
*/
namespace Magento\Backend\Controller\Adminhtml\System\Design;

class Save extends \Magento\Backend\Controller\Adminhtml\System\Design
use Magento\Framework\App\Action\HttpPostActionInterface;

/**
* Save design action.
*/
class Save extends \Magento\Backend\Controller\Adminhtml\System\Design implements HttpPostActionInterface
{
/**
* Filtering posted data. Converting localized data if needed
Expand All @@ -26,6 +31,8 @@ protected function _filterPostData($data)
}

/**
* Save design action.
*
* @return \Magento\Backend\Model\View\Result\Redirect
*/
public function execute()
Expand Down Expand Up @@ -54,10 +61,10 @@ public function execute()
} catch (\Exception $e) {
$this->messageManager->addErrorMessage($e->getMessage());
$this->_objectManager->get(\Magento\Backend\Model\Session::class)->setDesignData($data);
return $resultRedirect->setPath('adminhtml/*/', ['id' => $design->getId()]);
return $resultRedirect->setPath('*/*/edit', ['id' => $design->getId()]);
}
}

return $resultRedirect->setPath('adminhtml/*/');
return $resultRedirect->setPath('*/*/');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Magento\Catalog\Model\Config\Source\Product\Options\Price as ProductOptionsPrice;
use Magento\Framework\UrlInterface;
use Magento\Framework\Stdlib\ArrayManager;
use Magento\Ui\Component\Form\Element\Hidden;
use Magento\Ui\Component\Modal;
use Magento\Ui\Component\Container;
use Magento\Ui\Component\DynamicRows;
Expand Down Expand Up @@ -867,10 +868,9 @@ protected function getPositionFieldConfig($sortOrder)
'data' => [
'config' => [
'componentType' => Field::NAME,
'formElement' => Input::NAME,
'formElement' => Hidden::NAME,
'dataScope' => static::FIELD_SORT_ORDER_NAME,
'dataType' => Number::NAME,
'visible' => false,
'sortOrder' => $sortOrder,
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@
<label translate="true">Websites</label>
</settings>
</column>
<column name="cost" class="Magento\Catalog\Ui\Component\Listing\Columns\Price" sortOrder="120">
<settings>
<addField>true</addField>
<filter>textRange</filter>
<label translate="true">Cost</label>
</settings>
</column>
<actionsColumn name="actions" class="Magento\Catalog\Ui\Component\Listing\Columns\ProductActions" sortOrder="200">
<settings>
<indexField>entity_id</indexField>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<legend class="legend admin__legend">
<span><?= /* @escapeNotVerified */ __('Associated Products') ?></span>
</legend>
<div class="product-options">
<div class="field admin__field _required required">
<?php foreach ($_attributes as $_attribute): ?>
<div class="product-options fieldset admin__fieldset">
<?php foreach ($_attributes as $_attribute): ?>
<div class="field admin__field _required required">
<label class="label admin__field-label"><?php
/* @escapeNotVerified */ echo $_attribute->getProductAttribute()
->getStoreLabel($_product->getStoreId());
Expand All @@ -34,8 +34,8 @@
<option><?= /* @escapeNotVerified */ __('Choose an Option...') ?></option>
</select>
</div>
<?php endforeach; ?>
</div>
</div>
<?php endforeach; ?>
</div>
</fieldset>
<script>
Expand Down
3 changes: 2 additions & 1 deletion app/code/Magento/Cookie/Helper/Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ class Cookie extends \Magento\Framework\App\Helper\AbstractHelper
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param array $data
*
* @throws \InvalidArgumentException
* @throws \Magento\Framework\Exception\LocalizedException
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function __construct(
\Magento\Framework\App\Helper\Context $context,
Expand Down
8 changes: 5 additions & 3 deletions app/code/Magento/Customer/Model/ResourceModel/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class Group extends \Magento\Framework\Model\ResourceModel\Db\VersionControl\Abs

/**
* @param \Magento\Framework\Model\ResourceModel\Db\Context $context
* @param Snapshot $entitySnapshot,
* @param RelationComposite $entityRelationComposite,
* @param Snapshot $entitySnapshot
* @param RelationComposite $entityRelationComposite
* @param \Magento\Customer\Api\GroupManagementInterface $groupManagement
* @param Customer\CollectionFactory $customersFactory
* @param string $connectionName
Expand Down Expand Up @@ -110,6 +110,8 @@ protected function _afterDelete(\Magento\Framework\Model\AbstractModel $group)
}

/**
* Create customers collection.
*
* @return \Magento\Customer\Model\ResourceModel\Customer\Collection
*/
protected function _createCustomersCollection()
Expand All @@ -131,7 +133,7 @@ protected function _beforeSave(\Magento\Framework\Model\AbstractModel $group)
}

/**
* {@inheritdoc}
* @inheritdoc
*/
protected function _afterSave(\Magento\Framework\Model\AbstractModel $object)
{
Expand Down
29 changes: 25 additions & 4 deletions app/code/Magento/Customer/Model/Vat.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,21 @@ public function checkVatNumber($countryCode, $vatNumber, $requesterCountryCode =
return $gatewayResponse;
}

$countryCodeForVatNumber = $this->getCountryCodeForVatNumber($countryCode);
$requesterCountryCodeForVatNumber = $this->getCountryCodeForVatNumber($requesterCountryCode);

try {
$soapClient = $this->createVatNumberValidationSoapClient();

$requestParams = [];
$requestParams['countryCode'] = $countryCode;
$requestParams['countryCode'] = $countryCodeForVatNumber;
$vatNumberSanitized = $this->isCountryInEU($countryCode)
? str_replace([' ', '-', $countryCode], ['', '', ''], $vatNumber)
? str_replace([' ', '-', $countryCodeForVatNumber], ['', '', ''], $vatNumber)
: str_replace([' ', '-'], ['', ''], $vatNumber);
$requestParams['vatNumber'] = $vatNumberSanitized;
$requestParams['requesterCountryCode'] = $requesterCountryCode;
$requestParams['requesterCountryCode'] = $requesterCountryCodeForVatNumber;
$reqVatNumSanitized = $this->isCountryInEU($requesterCountryCode)
? str_replace([' ', '-', $requesterCountryCode], ['', '', ''], $requesterVatNumber)
? str_replace([' ', '-', $requesterCountryCodeForVatNumber], ['', '', ''], $requesterVatNumber)
: str_replace([' ', '-'], ['', ''], $requesterVatNumber);
$requestParams['requesterVatNumber'] = $reqVatNumSanitized;
// Send request to service
Expand Down Expand Up @@ -301,4 +304,22 @@ public function isCountryInEU($countryCode, $storeId = null)
);
return in_array($countryCode, $euCountries);
}

/**
* Returns the country code to use in the VAT number which is not always the same as the normal country code
*
* @param string $countryCode
* @return string
*/
private function getCountryCodeForVatNumber(string $countryCode): string
{
// Greece uses a different code for VAT numbers then its country code
// See: http://ec.europa.eu/taxation_customs/vies/faq.html#item_11
// And https://en.wikipedia.org/wiki/VAT_identification_number:
// "The full identifier starts with an ISO 3166-1 alpha-2 (2 letters) country code
// (except for Greece, which uses the ISO 639-1 language code EL for the Greek language,
// instead of its ISO 3166-1 alpha-2 country code GR)"

return $countryCode === 'GR' ? 'EL' : $countryCode;
}
}
2 changes: 1 addition & 1 deletion app/code/Magento/Directory/Model/CurrencyConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __construct(
*/
public function getConfigCurrencies(string $path)
{
$result = $this->appState->getAreaCode() === Area::AREA_ADMINHTML
$result = in_array($this->appState->getAreaCode(), [Area::AREA_ADMINHTML, Area::AREA_CRONTAB])
? $this->getConfigForAllStores($path)
: $this->getConfigForCurrentStore($path);
sort($result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ private function addDefaultCountryToOptions(array &$options)

foreach ($options as $key => $option) {
if (isset($defaultCountry[$option['value']])) {
$options[$key]['is_default'] = $defaultCountry[$option['value']];
$options[$key]['is_default'] = !empty($defaultCountry[$option['value']]);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected function setUp()
}

/**
* Test get currency config for admin and storefront areas.
* Test get currency config for admin, crontab and storefront areas.
*
* @dataProvider getConfigCurrenciesDataProvider
* @return void
Expand All @@ -91,7 +91,7 @@ public function testGetConfigCurrencies(string $areCode)
->method('getCode')
->willReturn('testCode');

if ($areCode === Area::AREA_ADMINHTML) {
if (in_array($areCode, [Area::AREA_ADMINHTML, Area::AREA_CRONTAB])) {
$this->storeManager->expects(self::once())
->method('getStores')
->willReturn([$store]);
Expand Down Expand Up @@ -121,6 +121,7 @@ public function getConfigCurrenciesDataProvider()
{
return [
['areaCode' => Area::AREA_ADMINHTML],
['areaCode' => Area::AREA_CRONTAB],
['areaCode' => Area::AREA_FRONTEND],
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
</thead>

<?php if ($_hasAssociatedProducts): ?>
<?php foreach ($_associatedProducts as $_item): ?>
<tbody>
<?php foreach ($_associatedProducts as $_item): ?>
<tr>
<td data-th="<?= $block->escapeHtml(__('Product Name')) ?>" class="col item">
<strong class="product-item-name"><?= $block->escapeHtml($_item->getName()) ?></strong>
Expand Down Expand Up @@ -80,8 +80,8 @@
</td>
</tr>
<?php endif; ?>
</tbody>
<?php endforeach; ?>
</tbody>
<?php else: ?>
<tbody>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<argument name="message_block_visibility" xsi:type="string">true</argument>
<argument name="use_ajax" xsi:type="string">true</argument>
<argument name="save_parameters_in_session" xsi:type="string">1</argument>
<argument name="grid_url" xsi:type="url" path="*/*/grid"/>
</arguments>
<block class="Magento\Backend\Block\Widget\Grid\ColumnSet" name="adminhtml.newslettrer.problem.grid.columnSet" as="grid.columnSet">
<arguments>
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Quote/Model/ResourceModel/Quote.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class Quote extends AbstractDb

/**
* @param \Magento\Framework\Model\ResourceModel\Db\Context $context
* @param Snapshot $entitySnapshot,
* @param RelationComposite $entityRelationComposite,
* @param Snapshot $entitySnapshot
* @param RelationComposite $entityRelationComposite
* @param \Magento\SalesSequence\Model\Manager $sequenceManager
* @param string $connectionName
*/
Expand Down Expand Up @@ -296,7 +296,7 @@ public function markQuotesRecollect($productIds)
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function save(\Magento\Framework\Model\AbstractModel $object)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,15 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Quote\Setup\Patch\Data;

use Magento\Framework\App\ResourceConnection;
use Magento\Quote\Setup\ConvertSerializedDataToJsonFactory;
use Magento\Quote\Setup\QuoteSetupFactory;
use Magento\Framework\Setup\Patch\DataPatchInterface;
use Magento\Framework\Setup\Patch\PatchVersionInterface;

/**
* Class ConvertSerializedDataToJson
* @package Magento\Quote\Setup\Patch
* Convert quote serialized data to json.
*/
class ConvertSerializedDataToJson implements DataPatchInterface, PatchVersionInterface
{
Expand All @@ -36,6 +33,8 @@ class ConvertSerializedDataToJson implements DataPatchInterface, PatchVersionInt
/**
* PatchInitial constructor.
* @param \Magento\Framework\Setup\ModuleDataSetupInterface $moduleDataSetup
* @param QuoteSetupFactory $quoteSetupFactory
* @param ConvertSerializedDataToJsonFactory $convertSerializedDataToJsonFactory
*/
public function __construct(
\Magento\Framework\Setup\ModuleDataSetupInterface $moduleDataSetup,
Expand All @@ -48,7 +47,7 @@ public function __construct(
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function apply()
{
Expand All @@ -57,7 +56,7 @@ public function apply()
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public static function getDependencies()
{
Expand All @@ -67,15 +66,15 @@ public static function getDependencies()
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public static function getVersion()
{
return '2.0.6';
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function getAliases()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<?php
/**
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Reports\Controller\Adminhtml\Report\Statistics;

class RefreshLifetime extends \Magento\Reports\Controller\Adminhtml\Report\Statistics
use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface;
use Magento\Reports\Controller\Adminhtml\Report\Statistics;

/**
* Refresh statistics action.
*/
class RefreshLifetime extends Statistics implements HttpPostActionInterface
{
/**
* Refresh statistics for all period
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Review/Block/Adminhtml/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ protected function _construct()
}

if ($this->getRequest()->getParam('ret', false) == 'pending') {
$this->buttonList->update('back', 'onclick', 'setLocation(\'' . $this->getUrl('catalog/*/pending') . '\')');
$this->buttonList->update('back', 'onclick', 'setLocation(\'' . $this->getUrl('review/*/pending') . '\')');
$this->buttonList->update(
'delete',
'onclick',
'deleteConfirm(' . '\'' . __(
'Are you sure you want to do this?'
) . '\' ' . '\'' . $this->getUrl(
) . '\', ' . '\'' . $this->getUrl(
'*/*/delete',
[$this->_objectId => $this->getRequest()->getParam($this->_objectId), 'ret' => 'pending']
) . '\'' . ')'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@
use Magento\Framework\Controller\ResultFactory;
use Magento\Framework\Exception\LocalizedException;

/**
* Save Review action.
*/
class Save extends ProductController implements HttpPostActionInterface
{
/**
* Save Review action.
*
* @return \Magento\Backend\Model\View\Result\Redirect
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*/
Expand Down Expand Up @@ -64,7 +69,7 @@ public function execute()
if ($nextId) {
$resultRedirect->setPath('review/*/edit', ['id' => $nextId]);
} elseif ($this->getRequest()->getParam('ret') == 'pending') {
$resultRedirect->setPath('*/*/pending');
$resultRedirect->setPath('review/*/pending');
} else {
$resultRedirect->setPath('*/*/');
}
Expand Down
Loading

0 comments on commit 23bc18f

Please sign in to comment.