-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENGCOM-4377: Fixed #21425 Date design change show not correctly value…
… in backend #21443 - Merge Pull Request #21443 from opencommerce/magento2:2.3-developPR21425 - Merged commits: 1. 68ee3af 2. 8e95bfd 3. f0a98a5
- Loading branch information
Showing
48 changed files
with
1,963 additions
and
401 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
app/code/Magento/Catalog/Test/Mftf/Data/ProductLinkData.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> | ||
<entity name="RelatedProductLink" type="product_link"> | ||
<var key="sku" entityKey="sku" entityType="product2"/> | ||
<var key="linked_product_sku" entityKey="sku" entityType="product"/> | ||
<data key="link_type">related</data> | ||
<data key="linked_product_type">simple</data> | ||
<data key="position">1</data> | ||
<requiredEntity type="product_link_extension_attribute">Qty1000</requiredEntity> | ||
</entity> | ||
</entities> |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Catalog/Test/Mftf/Data/ProductLinksData.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> | ||
<entity name="OneRelatedProductLink" type="product_links"> | ||
<requiredEntity type="product_link">RelatedProductLink</requiredEntity> | ||
</entity> | ||
</entities> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> | ||
<entity name="ProductLinkWidget" extends="ProductsListWidget"> | ||
<data key="type">Catalog Product Link</data> | ||
<data key="template">Product Link Block Template</data> | ||
</entity> | ||
</entities> |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Catalog/Test/Mftf/Page/AdminNewWidgetPage.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd"> | ||
<page name="AdminNewWidgetPage" url="admin/widget_instance/new/" area="admin" module="Magento_Widget"> | ||
<section name="AdminNewWidgetSelectProductPopupSection"/> | ||
</page> | ||
</pages> |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Catalog/Test/Mftf/Section/AdminNewWidgetSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="AdminNewWidgetSection"> | ||
<element name="selectProduct" type="button" selector=".btn-chooser" timeout="30"/> | ||
</section> | ||
</sections> |
15 changes: 15 additions & 0 deletions
15
app/code/Magento/Catalog/Test/Mftf/Section/AdminNewWidgetSelectProductPopupSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="AdminNewWidgetSelectProductPopupSection"> | ||
<element name="filterBySku" type="input" selector=".data-grid-filters input[name='chooser_sku']"/> | ||
<element name="firstRow" type="select" selector=".even>td" timeout="20"/> | ||
</section> | ||
</sections> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
app/code/Magento/Fedex/Plugin/Block/DataProviders/Tracking/ChangeTitle.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Fedex\Plugin\Block\DataProviders\Tracking; | ||
|
||
use Magento\Fedex\Model\Carrier; | ||
use Magento\Shipping\Model\Tracking\Result\Status; | ||
use Magento\Shipping\Block\DataProviders\Tracking\DeliveryDateTitle as Subject; | ||
|
||
/** | ||
* Plugin to change delivery date title with FedEx customized value | ||
*/ | ||
class ChangeTitle | ||
{ | ||
/** | ||
* Title modification in case if FedEx used as carrier | ||
* | ||
* @param Subject $subject | ||
* @param \Magento\Framework\Phrase|string $result | ||
* @param Status $trackingStatus | ||
* @return \Magento\Framework\Phrase|string | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
*/ | ||
public function afterGetTitle(Subject $subject, $result, Status $trackingStatus) | ||
{ | ||
if ($trackingStatus->getCarrier() === Carrier::CODE) { | ||
$result = __('Expected Delivery:'); | ||
} | ||
return $result; | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
app/code/Magento/Fedex/Plugin/Block/Tracking/PopupDeliveryDate.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Fedex\Plugin\Block\Tracking; | ||
|
||
use Magento\Shipping\Block\Tracking\Popup; | ||
use Magento\Fedex\Model\Carrier; | ||
use Magento\Shipping\Model\Tracking\Result\Status; | ||
|
||
/** | ||
* Plugin to update delivery date value in case if Fedex used | ||
*/ | ||
class PopupDeliveryDate | ||
{ | ||
/** | ||
* Show only date for expected delivery in case if Fedex is a carrier | ||
* | ||
* @param Popup $subject | ||
* @param string $result | ||
* @param string $date | ||
* @param string $time | ||
* @return string | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
*/ | ||
public function afterFormatDeliveryDateTime(Popup $subject, $result, $date, $time) | ||
{ | ||
if ($this->getCarrier($subject) === Carrier::CODE) { | ||
$result = $subject->formatDeliveryDate($date); | ||
} | ||
return $result; | ||
} | ||
|
||
/** | ||
* Retrieve carrier name from tracking info | ||
* | ||
* @param Popup $subject | ||
* @return string | ||
*/ | ||
private function getCarrier(Popup $subject): string | ||
{ | ||
foreach ($subject->getTrackingInfo() as $trackingData) { | ||
foreach ($trackingData as $trackingInfo) { | ||
if ($trackingInfo instanceof Status) { | ||
$carrier = $trackingInfo->getCarrier(); | ||
return $carrier; | ||
} | ||
} | ||
} | ||
return ''; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
app/code/Magento/QuoteGraphQl/Model/Resolver/SelectedPaymentMethod.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\QuoteGraphQl\Model\Resolver; | ||
|
||
use Magento\Framework\Exception\LocalizedException; | ||
use Magento\Framework\GraphQl\Config\Element\Field; | ||
use Magento\Framework\GraphQl\Query\ResolverInterface; | ||
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo; | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
class SelectedPaymentMethod implements ResolverInterface | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null) | ||
{ | ||
if (!isset($value['model'])) { | ||
throw new LocalizedException(__('"model" value should be specified')); | ||
} | ||
|
||
/** @var \Magento\Quote\Model\Quote $cart */ | ||
$cart = $value['model']; | ||
|
||
$payment = $cart->getPayment(); | ||
if (!$payment) { | ||
return []; | ||
} | ||
|
||
return [ | ||
'code' => $payment->getMethod(), | ||
'purchase_order_number' => $payment->getPoNumber(), | ||
]; | ||
} | ||
} |
Oops, something went wrong.