Skip to content

Commit 2557fc7

Browse files
[Magento Community Engineering] Community Contributions - 2.3-develop-expedited-prs
- merged with '2.3-develop-prs' branch
2 parents d39a12f + 1de2870 commit 2557fc7

File tree

13 files changed

+382
-7
lines changed

13 files changed

+382
-7
lines changed
Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,48 @@
1-
This component is designed to provide response for client who launched the bulk operation as soon as possible and postpone handling of operations moving them to background handler.
1+
# Magento_AsynchronousOperations module
2+
3+
This component is designed to provide a response for a client that launched the bulk operation as soon as possible and postpone handling of operations moving them to the background handler.
4+
5+
## Installation details
6+
7+
The Magento_AsynchronousOperations module creates the following tables in the database:
8+
9+
- `magento_bulk`
10+
- `magento_operation`
11+
- `magento_acknowledged_bulk`
12+
13+
Before disabling or uninstalling this module, note that the following modules depends on this module:
14+
15+
- Magento_WebapiAsync
16+
17+
For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-subcommands-enable.html).
18+
19+
## Extensibility
20+
21+
Extension developers can interact with the Magento_AsynchronousOperations module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html).
22+
23+
[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AsynchronousOperations module.
24+
25+
### Layouts
26+
27+
This module introduces the following layouts and layout handles in the `view/adminhtml/layout` directory:
28+
29+
- `bulk_bulk_details`
30+
- `bulk_bulk_details_modal`
31+
- `bulk_index_index`
32+
33+
For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html).
34+
35+
### UI components
36+
37+
You can extend Magento_AsynchronousOperations module using the following configuration files in the `view/adminhtml/ui_component/` directory:
38+
39+
- `bulk_details_form`
40+
- `bulk_details_form_modal`
41+
- `bulk_listing`
42+
- `failed_operation_listing`
43+
- `failed_operation_modal_listing`
44+
- `notification_area`
45+
- `retriable_operation_listing`
46+
- `retriable_operation_modal_listing`
47+
48+
For information about UI components in Magento 2, see [Overview of UI components](https://devdocs.magento.com/guides/v2.3/ui_comp_guide/bk-ui_comps.html).
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
1+
# Magento_AuthorizenetAcceptjs module
2+
13
The Magento_AuthorizenetAcceptjs module implements the integration with the Authorize.Net payment gateway and makes the latter available as a payment method in Magento.
4+
5+
## Installation details
6+
7+
Before disabling or uninstalling this module, note that the `Magento_AuthorizenetCardinal` module depends on this module.
8+
9+
For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-subcommands-enable.html).
10+
11+
## Structure
12+
13+
`Gateway/` - the directory that contains payment gateway command interfaces and service classes.
14+
15+
For information about typical file structure of a module in Magento 2, see [Module file structure](http://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/module-file-structure.html#module-file-structure).
16+
17+
## Extensibility
18+
19+
Extension developers can interact with the Magento_AuthorizenetAcceptjs module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html).
20+
21+
[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AuthorizenetAcceptjs module.
22+
23+
### Events
24+
25+
This module observes the following events:
26+
27+
- `payment_method_assign_data_authorizenet_acceptjs` event in the `Magento\AuthorizenetAcceptjs\Observer\DataAssignObserver` file.
28+
29+
For information about an event in Magento 2, see [Events and observers](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/events-and-observers.html#events).
Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,23 @@
1-
The AuthorizenetCardinal module provides a possibility to enable 3-D Secure 2.0 support for AuthorizenetAcceptjs payment integration.
1+
# Magento_AuthorizenetCardinal module
2+
3+
Use the Magento_AuthorizenetCardinal module to enable 3D Secure 2.0 support for AuthorizenetAcceptjs payment integrations.
4+
5+
## Structure
6+
7+
`Gateway/` - the directory that contains payment gateway command interfaces and service classes.
8+
9+
For information about typical file structure of a module in Magento 2, see [Module file structure](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/module-file-structure.html#module-file-structure).
10+
11+
## Extensibility
12+
13+
Extension developers can interact with the Magento_AuthorizenetCardinal module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html).
14+
15+
[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AuthorizenetCardinal module.
16+
17+
### Events
18+
19+
This module observes the following events:
20+
21+
- `payment_method_assign_data_authorizenet_acceptjs` event in the `Magento\AuthorizenetCardinal\Observer\DataAssignObserver` file.
22+
23+
For information about an event in Magento 2, see [Events and observers](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/events-and-observers.html#events).
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1-
# AuthorizenetGraphQl
1+
# Magento_AuthorizenetGraphQl module
22

3-
**AuthorizenetGraphQl** defines the data types needed to pass payment information data from the client to Magento.
3+
The Magento_AuthorizenetGraphQl module defines the data types needed to pass payment information data from the client to Magento.
4+
5+
## Extensibility
6+
7+
Extension developers can interact with the Magento_AuthorizenetGraphQl module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html).
8+
9+
[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AuthorizenetGraphQl module.

app/code/Magento/Checkout/Model/Session.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* @api
1818
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1919
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
20+
* @SuppressWarnings(PHPMD.TooManyFields)
2021
*/
2122
class Session extends \Magento\Framework\Session\SessionManager
2223
{
@@ -46,6 +47,15 @@ class Session extends \Magento\Framework\Session\SessionManager
4647
*/
4748
protected $_loadInactive = false;
4849

50+
/**
51+
* A flag to track when the quote is being loaded and attached to the session object.
52+
*
53+
* Used in trigger_recollect infinite loop detection.
54+
*
55+
* @var bool
56+
*/
57+
private $isLoading = false;
58+
4959
/**
5060
* Loaded order instance
5161
*
@@ -227,6 +237,10 @@ public function getQuote()
227237
$this->_eventManager->dispatch('custom_quote_process', ['checkout_session' => $this]);
228238

229239
if ($this->_quote === null) {
240+
if ($this->isLoading) {
241+
throw new \LogicException("Infinite loop detected, review the trace for the looping path");
242+
}
243+
$this->isLoading = true;
230244
$quote = $this->quoteFactory->create();
231245
if ($this->getQuoteId()) {
232246
try {
@@ -289,6 +303,7 @@ public function getQuote()
289303

290304
$quote->setStore($this->_storeManager->getStore());
291305
$this->_quote = $quote;
306+
$this->isLoading = false;
292307
}
293308

294309
if (!$this->isQuoteMasked() && !$this->_customerSession->isLoggedIn() && $this->getQuoteId()) {

app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,16 @@ define([
2828
* @return {String}
2929
*/
3030
getShippingMethodTitle: function () {
31-
var shippingMethod = quote.shippingMethod();
31+
var shippingMethod = quote.shippingMethod(),
32+
shippingMethodTitle = '';
3233

33-
return shippingMethod ? shippingMethod['carrier_title'] + ' - ' + shippingMethod['method_title'] : '';
34+
if (typeof shippingMethod['method_title'] !== 'undefined') {
35+
shippingMethodTitle = ' - ' + shippingMethod['method_title'];
36+
}
37+
38+
return shippingMethod ?
39+
shippingMethod['carrier_title'] + shippingMethodTitle :
40+
shippingMethod['carrier_title'];
3441
},
3542

3643
/**

app/code/Magento/SalesRule/view/adminhtml/templates/promo/salesrulejs.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function generateCouponCodes(idPrefix, generateUrl, grid) {
6464
try {
6565
response = JSON.parse(transport.responseText);
6666
} catch (e) {
67-
console.warn('An error occured while parsing response');
67+
console.warn('An error occurred while parsing response');
6868
}
6969
}
7070
if (couponCodesGrid) {
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\TestModuleQuoteTotalsObserver\Model;
9+
10+
class Config
11+
{
12+
private $active = false;
13+
14+
public function enableObserver()
15+
{
16+
$this->active = true;
17+
}
18+
19+
public function disableObserver()
20+
{
21+
$this->active = false;
22+
}
23+
24+
public function isActive()
25+
{
26+
return $this->active;
27+
}
28+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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\TestModuleQuoteTotalsObserver\Observer;
9+
10+
use Magento\Framework\Event\Observer;
11+
use Magento\Framework\Event\ObserverInterface;
12+
13+
class AfterCollectTotals implements ObserverInterface
14+
{
15+
/**
16+
* @var \Magento\Checkout\Model\Session
17+
*/
18+
private $session;
19+
20+
/**
21+
* @var \Magento\TestModuleQuoteTotalsObserver\Model\Config
22+
*/
23+
private $config;
24+
25+
/**
26+
* AfterCollectTotals constructor.
27+
* @param \Magento\Checkout\Model\Session $messageManager
28+
* @param \Magento\TestModuleQuoteTotalsObserver\Model\Config $config
29+
*/
30+
public function __construct(
31+
\Magento\Checkout\Model\Session $messageManager,
32+
\Magento\TestModuleQuoteTotalsObserver\Model\Config $config
33+
) {
34+
$this->config = $config;
35+
$this->session = $messageManager;
36+
}
37+
38+
/**
39+
* @param Observer $observer
40+
* @return void
41+
*/
42+
public function execute(\Magento\Framework\Event\Observer $observer)
43+
{
44+
$observer->getEvent();
45+
if ($this->config->isActive()) {
46+
$this->session->getQuote();
47+
}
48+
}
49+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
9+
<event name="sales_quote_collect_totals_after">
10+
<observer name="test_module_quote_totals_observer_after_collect_totals" instance="Magento\TestModuleQuoteTotalsObserver\Observer\AfterCollectTotals" />
11+
</event>
12+
</config>

0 commit comments

Comments
 (0)