Skip to content

Commit 18cf222

Browse files
authored
[Backport] Fixed - Lifetime update syntax error magento#13309 (#4)
* Escaped output of html attributes * MAGETWO-97466: Refreshing checkout page deletes shipping address on guest checkout * MAGETWO-96711: One page Checkout resets Customer data if Product Qty was changed * MAGETWO-72879: Update product from mini shopping cart doesn't reflect in the shopping cart * meassage icon alignment issue resolved * ENGCOM-3851: Static test fix. * ENGCOM-3893: Static test fix. * MAGETWO-96711: One page Checkout resets Customer data if Product Qty was changed * MAGETWO-97826: Skipped Randomly failing MFTF test AdminCheckingCreditMemoTotalsTest * MAGETWO-97825: Skipped Randomly failing test AdminCreateCreditMemoWhenCartRuleDeletedTest * Fixed-19800: Contact us : design improvement. * Fixed 19800 Contact us : design improvement * Fixed 19800 Contact us : design improvement * Fixed 19800 Contact us : design improvement * Fixed 19800 Contact us : design improvement * Fixed 19800 Contact us : design improvement * ENGCOM-3763: Static test fix. * Fixed-19791: Logo vertical misalignment. * Fixed-Checkbox-Alignement: Checkbox alignment issue. * MAGETWO-72879: Update product from mini shopping cart doesn't reflect in the shopping cart * MAGETWO-96711: One page Checkout resets Customer data if Product Qty was changed * MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price * magento#18362: Fixed static tests * Added constants to unit codes to make it easier to reuse it if necessary. * ENGCOM-3774: Static test fix. * MAGETWO-96815: There is no option to remove the Store Credit from the payment page of checkout * Fix negative credit memo bug caused by credit memo discount total calculator * ENGCOM-3720: Static test fix. * Added required error message. If any JSON error occurs user will be be shown error message if the app mode is not in Production. * Fixed Unused Local variable * Fixed unused local variable * Removed use of Class ObjectManager in Construct * Updated to show error message to all Env. * Update lib/internal/Magento/Framework/Serialize/Serializer/Json.php Co-Authored-By: vinogcs <[email protected]> * ENGCOM-3782: Static test fix. * Add useful debug info for which website has not been found * Add with code/with id text * MAGETWO-73598: CLONE - Quans: Orders API without key/value on ADDITIONAL_INFORMATION (only values) * MAGETWO-96815: There is no option to remove the Store Credit from the payment page of checkout * Issue fixed magento#19985 Send email confirmation popup close button area overlapping to content Issue fixed magento#19985 Send email confirmation popup close button area overlapping to content * Issue fixed magento#19985 Send email confirmation popup close button area overlapping Issue fixed magento#19985 Send email confirmation popup close button area overlapping * Order API resources updated. * 'wishlist-page-edit-remove-item-misalign' :: On wish list page edit, remove item misalign in 640 X 767 resolution * Order-view-invoices :: Order view invoices template not display proper on ipad * Updated CancelOrderItemObserver.php Fixed Issue magento#20121 Cancel order increases stock although "Set Items' Status to be In Stock When Order is Cancelled" is set to No * ENGCOM-3845: Static test fix. * MAGETWO-74604: Event clean_cache_by_tags didn't clean all tags pointed in getIdentity * MAGETWO-73598: CLONE - Quans: Orders API without key/value on ADDITIONAL_INFORMATION (only values) * MAGETWO-97899: [FT] [MFTF] AdminAvailabilityCreditMemoWithNoPaymentTest fails because of bad design * MAGETWO-94157: Issue with products with customizable options * MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price * MAGETWO-93832: Automate with MFTF Copy Single Update to Another Update * MAGETWO-73598: CLONE - Quans: Orders API without key/value on ADDITIONAL_INFORMATION (only values) * Static test fix. * MAGETWO-95276: Varnish "Connection reset by peer" error when large catalog is reindexed on schedule * MAGETWO-95176: Detaching category from product causes massive product url regeneration * MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price * MAGETWO-73625: Products change in one category will cause cache miss for other categories (Only reproducible by unassigning products from backend category page) * admin-order-info-issue2.2 * MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price * MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price * Fix static test. * MAGETWO-95176: Detaching category from product causes massive product url regeneration * magento#20376 Fix issue with file uploading if an upload field is disabled * magento#20461 Add translate component * (Fixes issue magento#18027) Round the total amount to 4 decimal places, to avoid floating point overflows * round the total amount only if it is float * round base total amount * cast formatted number to float * thousand separator removed from number format * use round instead of number_format to round the total amount * unnecessary comments removed * ENGCOM-3464: Static tests fixed. * fixed Negative order amount in dashboard - magento#18754 * Fix static test. * Update styles-old.less * update-button-issue-while-updating-billing-and-shipping-address * MAGETWO-95752: Unable to create Configurations for Configurable Products * issue fixed magento#20563 Go to shipping information, Update qty & Addresses and Enter a new address button Not aligned from left and right in 767px screen size issue fixed magento#20563 Go to shipping information, Update qty & Addresses and Enter a new address button Not aligned from left and right in 767px screen size * recent-order-product-title-misaligned * Fix static tests. * Fix static tests. * MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price * MAGETWO-95752: Unable to create Configurations for Configurable Products * MAGETWO-95752: Unable to create Configurations for Configurable Products * MAGETWO-95752: Unable to create Configurations for Configurable Products * MAGETWO-94114: Cannot refresh Captcha image in production mode * MQE-1420: Bump MFTF version in Magento - MFTF version bump + allure-codeception dependency update. * MQE-1420: Bump MFTF version in Magento - changing argument from its own attribute to part of the command * Fixed issue of Lifetime update syntax error * Fix static test.
1 parent 8a059e6 commit 18cf222

File tree

719 files changed

+18293
-2807
lines changed

Some content is hidden

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

719 files changed

+18293
-2807
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Authorizenet\Block\Adminhtml\Order\View\Info;
9+
10+
use Magento\Framework\Phrase;
11+
use Magento\Payment\Block\ConfigurableInfo;
12+
13+
/**
14+
* Payment information block for Authorize.net payment method.
15+
*/
16+
class PaymentDetails extends ConfigurableInfo
17+
{
18+
/**
19+
* Returns localized label for payment info block.
20+
*
21+
* @param string $field
22+
* @return string | Phrase
23+
*/
24+
protected function getLabel($field)
25+
{
26+
return __($field);
27+
}
28+
}

app/code/Magento/Authorizenet/Model/Directpost.php

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Directpost extends \Magento\Authorizenet\Model\Authorizenet implements Tra
2727
/**
2828
* @var string
2929
*/
30-
protected $_infoBlockType = \Magento\Payment\Block\Info::class;
30+
protected $_infoBlockType = \Magento\Authorizenet\Block\Adminhtml\Order\View\Info\PaymentDetails::class;
3131

3232
/**
3333
* Payment Method feature
@@ -371,8 +371,7 @@ public function void(\Magento\Payment\Model\InfoInterface $payment)
371371
}
372372

373373
/**
374-
* Refund the amount
375-
* Need to decode last 4 digits for request.
374+
* Refund the amount need to decode last 4 digits for request.
376375
*
377376
* @param \Magento\Framework\DataObject|\Magento\Payment\Model\InfoInterface $payment
378377
* @param float $amount
@@ -626,6 +625,14 @@ protected function fillPaymentByResponse(\Magento\Framework\DataObject $payment)
626625
$payment->setIsTransactionPending(true)
627626
->setIsFraudDetected(true);
628627
}
628+
629+
$additionalInformationKeys = explode(',', $this->getValue('paymentInfoKeys'));
630+
foreach ($additionalInformationKeys as $paymentInfoKey) {
631+
$paymentInfoValue = $response->getDataByKey($paymentInfoKey);
632+
if ($paymentInfoValue !== null) {
633+
$payment->setAdditionalInformation($paymentInfoKey, $paymentInfoValue);
634+
}
635+
}
629636
}
630637

631638
/**
@@ -682,6 +689,7 @@ protected function matchAmount($amount)
682689

683690
/**
684691
* Operate with order using information from Authorize.net.
692+
*
685693
* Authorize order or authorize and capture it.
686694
*
687695
* @param \Magento\Sales\Model\Order $order
@@ -824,6 +832,7 @@ protected function declineOrder(\Magento\Sales\Model\Order $order, $message = ''
824832
->void($response);
825833
}
826834
$order->registerCancellation($message)->save();
835+
$this->_eventManager->dispatch('order_cancel_after', ['order' => $order ]);
827836
} catch (\Exception $e) {
828837
//quiet decline
829838
$this->getPsrLogger()->critical($e);
@@ -858,7 +867,7 @@ public function getConfigInterface()
858867
* Getter for specified value according to set payment method code
859868
*
860869
* @param mixed $key
861-
* @param null $storeId
870+
* @param int|string|null|\Magento\Store\Model\Store $storeId
862871
* @return mixed
863872
*/
864873
public function getValue($key, $storeId = null)
@@ -918,10 +927,13 @@ public function fetchTransactionInfo(\Magento\Payment\Model\InfoInterface $payme
918927
$payment->setIsTransactionDenied(true);
919928
}
920929
$this->addStatusCommentOnUpdate($payment, $response, $transactionId);
921-
return [];
930+
931+
return $response->getData();
922932
}
923933

924934
/**
935+
* Add statuc comment on update.
936+
*
925937
* @param \Magento\Sales\Model\Order\Payment $payment
926938
* @param \Magento\Framework\DataObject $response
927939
* @param string $transactionId
@@ -996,8 +1008,9 @@ protected function getTransactionResponse($transactionId)
9961008
}
9971009

9981010
/**
999-
* @return \Psr\Log\LoggerInterface
1011+
* Get psr logger.
10001012
*
1013+
* @return \Psr\Log\LoggerInterface
10011014
* @deprecated 100.1.0
10021015
*/
10031016
private function getPsrLogger()
@@ -1038,7 +1051,9 @@ private function getOrderIncrementId(): string
10381051
}
10391052

10401053
/**
1041-
* Checks if filter action is Report Only. Transactions that trigger this filter are processed as normal,
1054+
* Checks if filter action is Report Only.
1055+
*
1056+
* Transactions that trigger this filter are processed as normal,
10421057
* but are also reported in the Merchant Interface as triggering this filter.
10431058
*
10441059
* @param string $fdsFilterAction

app/code/Magento/Authorizenet/etc/config.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<cgi_url>https://secure.authorize.net/gateway/transact.dll</cgi_url>
3333
<cgi_url_td_test_mode>https://apitest.authorize.net/xml/v1/request.api</cgi_url_td_test_mode>
3434
<cgi_url_td>https://api2.authorize.net/xml/v1/request.api</cgi_url_td>
35+
<paymentInfoKeys>x_card_type,x_account_number,x_avs_code,x_auth_code,x_response_reason_text,x_cvv2_resp_code</paymentInfoKeys>
3536
</authorizenet_directpost>
3637
</payment>
3738
</default>

app/code/Magento/Authorizenet/etc/di.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,9 @@
3535
</argument>
3636
</arguments>
3737
</type>
38+
<type name="Magento\Authorizenet\Block\Adminhtml\Order\View\Info\PaymentDetails">
39+
<arguments>
40+
<argument name="config" xsi:type="object">Magento\Authorizenet\Model\Directpost</argument>
41+
</arguments>
42+
</type>
3843
</config>

app/code/Magento/Authorizenet/i18n/en_US.csv

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,9 @@ Debug,Debug
6767
"Minimum Order Total","Minimum Order Total"
6868
"Maximum Order Total","Maximum Order Total"
6969
"Sort Order","Sort Order"
70+
"x_card_type","Credit Card Type"
71+
"x_account_number", "Credit Card Number"
72+
"x_avs_code","AVS Response Code"
73+
"x_auth_code","Processor Authentication Code"
74+
"x_response_reason_text","Processor Response Text"
75+
"x_cvv2_resp_code","CVV2 Response Code"

app/code/Magento/Authorizenet/view/adminhtml/templates/order/view/info/fraud_details.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ $fraudDetails = $payment->getAdditionalInformation('fraud_details');
4444
<?php endif; ?>
4545

4646
<?php if(!empty($fraudDetails['fraud_filters'])): ?>
47-
<b><?= $block->escapeHtml(__('Fraud Filters')) ?>:
48-
</b></br>
47+
<strong><?= $block->escapeHtml(__('Fraud Filters')) ?>:
48+
</strong></br>
4949
<?php foreach($fraudDetails['fraud_filters'] as $filter): ?>
5050
<?= $block->escapeHtml($filter['name']) ?>:
5151
<?= $block->escapeHtml($filter['action']) ?>

app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ protected function _toHtml()
139139
}
140140

141141
/**
142-
* Field dependences JSON map generator
142+
* Field dependencies JSON map generator
143143
* @return string
144144
*/
145145
protected function _getDependsJson()

app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Magento\Backend\Block\Widget\Grid\Massaction;
77

88
use Magento\Backend\Block\Widget\Grid\Massaction\VisibilityCheckerInterface as VisibilityChecker;
9+
use Magento\Framework\Data\Collection\AbstractDb;
910
use Magento\Framework\DataObject;
1011

1112
/**
@@ -51,7 +52,7 @@ public function __construct(
5152
}
5253

5354
/**
54-
* @return void
55+
* @inheritdoc
5556
*/
5657
protected function _construct()
5758
{
@@ -216,6 +217,7 @@ public function getGridJsObjectName()
216217
* Retrieve JSON string of selected checkboxes
217218
*
218219
* @return string
220+
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
219221
*/
220222
public function getSelectedJson()
221223
{
@@ -230,6 +232,7 @@ public function getSelectedJson()
230232
* Retrieve array of selected checkboxes
231233
*
232234
* @return string[]
235+
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
233236
*/
234237
public function getSelected()
235238
{
@@ -251,6 +254,8 @@ public function getApplyButtonHtml()
251254
}
252255

253256
/**
257+
* Get mass action javascript code.
258+
*
254259
* @return string
255260
*/
256261
public function getJavaScript()
@@ -267,6 +272,8 @@ public function getJavaScript()
267272
}
268273

269274
/**
275+
* Get grid ids in JSON format.
276+
*
270277
* @return string
271278
*/
272279
public function getGridIdsJson()
@@ -282,7 +289,11 @@ public function getGridIdsJson()
282289
} else {
283290
$massActionIdField = $this->getParentBlock()->getMassactionIdField();
284291
}
285-
292+
if ($allIdsCollection instanceof AbstractDb) {
293+
$allIdsCollection->getSelect()->limit();
294+
$allIdsCollection->clear();
295+
}
296+
286297
$gridIds = $allIdsCollection->setPageSize(0)->getColumnValues($massActionIdField);
287298
if (!empty($gridIds)) {
288299
return join(",", $gridIds);
@@ -291,6 +302,8 @@ public function getGridIdsJson()
291302
}
292303

293304
/**
305+
* Get Html id.
306+
*
294307
* @return string
295308
*/
296309
public function getHtmlId()

app/code/Magento/Backend/Model/Search/Customer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function load()
8989

9090
$this->searchCriteriaBuilder->setCurrentPage($this->getStart());
9191
$this->searchCriteriaBuilder->setPageSize($this->getLimit());
92-
$searchFields = ['firstname', 'lastname', 'company'];
92+
$searchFields = ['firstname', 'lastname', 'billing_company'];
9393
$filters = [];
9494
foreach ($searchFields as $field) {
9595
$filters[] = $this->filterBuilder

app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
<element name="save" type="button" selector="#save" timeout="30"/>
1313
<element name="delete" type="button" selector="#delete"/>
1414
<element name="add" type="button" selector="#add" timeout="30"/>
15+
<element name="back" type="button" selector="#back" timeout="30"/>
1516
</section>
1617
</sections>

app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66
*/
77
-->
88

9-
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1011
<section name="AdminMessagesSection">
1112
<element name="test" type="input" selector=".test"/>
1213
<element name="success" type="text" selector="#messages div.message-success"/>
1314
<element name="successMessageByIndex" type="text" selector=".message.message-success.success:nth-of-type({{n}})>div" parameterized="true"/>
1415
<element name="error" type="text" selector="#messages div.message-error"/>
16+
<element name="notice" type="text" selector=".message.message-notice.notice"/>
1517
</section>
1618
</sections>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminSlideOutDialogSection">
12+
<element name="closeButton" type="button" selector=".modal-slide._show [data-role='closeBtn']" timeout="30"/>
13+
<element name="cancelButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Cancel']" timeout="30"/>
14+
<element name="doneButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Done']" timeout="30"/>
15+
<element name="saveButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Save']" timeout="30"/>
16+
</section>
17+
</sections>

app/code/Magento/Backend/view/adminhtml/templates/system/cache/additional.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ $permissions = $block->getData('permissions');
1111
?>
1212
<?php if ($permissions && $permissions->hasAccessToAdditionalActions()): ?>
1313
<div class="additional-cache-management">
14+
<h2>
15+
<span><?= $block->escapeHtml(__('Additional Cache Management')); ?></span>
16+
</h2>
1417
<?php if ($permissions->hasAccessToFlushCatalogImages()): ?>
15-
<h2>
16-
<span><?= $block->escapeHtml(__('Additional Cache Management')); ?></span>
17-
</h2>
1818
<p>
1919
<button onclick="setLocation('<?= $block->escapeJs($block->getCleanImagesUrl()); ?>')" type="button">
2020
<?= $block->escapeHtml(__('Flush Catalog Images Cache')); ?>

app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<?php $_tabType = (!preg_match('/\s?ajax\s?/', $_tabClass) && $block->getTabUrl($_tab) != '#') ? 'link' : '' ?>
1919
<?php $_tabHref = $block->getTabUrl($_tab) == '#' ? '#' . $block->getTabId($_tab) . '_content' : $block->getTabUrl($_tab) ?>
2020
<li>
21-
<a href="<?= /* @escapeNotVerified */ $_tabHref ?>" id="<?= /* @escapeNotVerified */ $block->getTabId($_tab) ?>" title="<?= /* @escapeNotVerified */ $block->getTabTitle($_tab) ?>" class="<?php $_tabClass ?>" data-tab-type="<?php $_tabType ?>">
21+
<a href="<?= $block->escapeHtmlAttr($_tabHref) ?>" id="<?= $block->escapeHtmlAttr($block->getTabId($_tab)) ?>" title="<?= $block->escapeHtmlAttr($block->getTabTitle($_tab)) ?>" class="<?= $block->escapeHtmlAttr($_tabClass) ?>" data-tab-type="<?= $block->escapeHtmlAttr($_tabType) ?>">
2222
<span>
2323
<span class="changed" title="<?= /* @escapeNotVerified */ __('The information in this tab has been changed.') ?>"></span>
2424
<span class="error" title="<?= /* @escapeNotVerified */ __('This tab contains invalid data. Please resolve this before saving.') ?>"></span>

app/code/Magento/Braintree/Controller/Paypal/PlaceOrder.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public function __construct(
5454

5555
/**
5656
* @inheritdoc
57+
*
5758
* @throws LocalizedException
5859
*/
5960
public function execute()
@@ -71,7 +72,10 @@ public function execute()
7172
return $resultRedirect->setPath('checkout/onepage/success', ['_secure' => true]);
7273
} catch (\Exception $e) {
7374
$this->logger->critical($e);
74-
$this->messageManager->addExceptionMessage($e, $e->getMessage());
75+
$this->messageManager->addExceptionMessage(
76+
$e,
77+
'The order #' . $quote->getReservedOrderId() . ' cannot be processed.'
78+
);
7579
}
7680

7781
return $resultRedirect->setPath('checkout/cart', ['_secure' => true]);

0 commit comments

Comments
 (0)