Skip to content

Commit

Permalink
1.0.25 Release (#47)
Browse files Browse the repository at this point in the history
* 1.0.25 Release

* 1.0.25 Release
- fixed failed tests

* 1.0.25 Release
- fixed incorrect version position in structure

* 1.0.25 Release
- fixed not correct patch versions

* 1.0.25 Release
- fixed not correct patch versions

* 1.0.25 Release
- removed one patch

* 1.0.25 Release
- fixed patch version
  • Loading branch information
Oleksandr Rykh authored Jun 26, 2021
1 parent 056a8af commit 1880260
Show file tree
Hide file tree
Showing 10 changed files with 1,845 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/quality-patches",
"description": "Provides quality patches for Magento 2",
"type": "magento2-component",
"version": "1.0.24",
"version": "1.0.25",
"license": "proprietary",
"repositories": {
"repo": {
Expand Down
103 changes: 100 additions & 3 deletions patches.json
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@
">=2.3.3 <2.3.5": {
"file": "os/MDVA-23773_2.3.3.patch"
},
"2.3.6 || 2.4.1": {
"2.3.6 || >=2.4.1 <2.4.3": {
"file": "os/MDVA-30524_2.3.6.patch"
},
">=2.3.5 <2.3.6": {
Expand Down Expand Up @@ -2025,7 +2025,7 @@
"MDVA-36615": {
"magento/magento2-base": {
"Fixes the issue with incorrect product count in admin product grid.": {
"2.4.2": {
">=2.4.2 <2.4.3": {
"file": "os/MDVA-36615_2.4.2.patch"
}
}
Expand All @@ -2035,6 +2035,19 @@
"magento/magento2-base": {
"Fixes the issue where the email notification configuration is not working at store-view level.": {
">=2.4.0 <=2.4.2": {
"file": "os/MDVA-36464_2.4.0-p1.patch",
"replaced-with": "MDVA-36464-V3"
}
}
}
},
"MDVA-36464-V3": {
"magento/magento2-base": {
"Fixes the issue where the email notification configuration is not working at store-view level.": {
">=2.4.0 <2.4.1": {
"file": "os/MDVA-36464_2.4.0-p1_v3.patch"
},
">=2.4.1 <2.4.3": {
"file": "os/MDVA-36464_2.4.0-p1.patch"
}
}
Expand Down Expand Up @@ -2098,10 +2111,28 @@
}
},
"MDVA-36833": {
"magento/magento2-base": {
"Fixes the issue with search results showing random numbers of products per page after excluding some products from shared catalog.": {
">=2.4.2 <2.4.4": {
"file": "os/MDVA-36833_2.4.2.patch",
"replaced-with": "MDVA-36833-V2"
}
}
},
"magento/magento2-b2b-base": {
"Fixes the issue with search results showing random numbers of products per page after excluding some products from shared catalog.": {
"^1.3.1": {
"file": "commerce/MDVA-36833_1.3.1.patch",
"replaced-with": "MDVA-36833-V2"
}
}
}
},
"MDVA-36833-V2": {
"magento/magento2-base": {
"Fixes the issue with search results showing random numbers of products per page after excluding some products from shared catalog.": {
">=2.4.2 <2.4.3": {
"file": "os/MDVA-36833_2.4.2.patch"
"file": "os/MDVA-36833_2.4.2_v2.patch"
}
}
},
Expand Down Expand Up @@ -2273,5 +2304,71 @@
}
}
}
},
"MDVA-37916": {
"magento/magento2-base": {
"Fixes the issue where the customer is not taken to the Payment Confirmation page when using Paypal Payment Advanced method.": {
">=2.3.6 <2.4.3": {
"file": "os/MDVA-37916_2.3.6-p1_v2.patch"
}
}
}
},
"MDVA-37082": {
"magento/inventory-composer-metapackage": {
"Fixes the issue when saving the custom stock of grouped products causes the product to show out of stock in the frontend.": {
">=1.0.3 <1.2.0": {
"file": "os/MDVA-37082_2.3.4-p2.patch"
}
}
},
"magento/inventory-metapackage": {
"Fixes the issue when saving the custom stock of grouped products causes the product to show out of stock in the frontend.": {
"^1.2.0": {
"file": "os/MDVA-37082_2.3.4-p2.patch"
}
}
}
},
"MDVA-36572": {
"magento/inventory-composer-metapackage": {
"Fixes the issue when Credit Memo updates no longer cause duplicate product reservation updates in the database.": {
"~1.1.5": {
"file": "os/MDVA-36572_2.4.1.patch"
}
}
},
"magento/inventory-metapackage": {
"Fixes the issue when Credit Memo updates no longer cause duplicate product reservation updates in the database.": {
"^1.2.0": {
"file": "os/MDVA-36572_2.4.1.patch"
}
}
}
},
"MDVA-38132": {
"magento/magento2-base": {
"Fixes the issue when the Admin panel is unreachable due to a \"too many redirects\" error.": {
">=2.3.3 <2.4.3": {
"file": "os/MDVA-38132_2.3.4-p2.patch"
}
}
}
},
"MDVA-38270": {
"magento/magento2-base": {
"Fixes the issue with missing Gift card information in the order total in GraphQL.": {
">=2.4.1 <2.4.3": {
"file": "os/MDVA-38270_2.4.2-p1.patch"
}
}
},
"magento/magento2-ee-base": {
"Fixes the issue with missing Gift card information in the order total in GraphQL.": {
">=2.4.1 <2.4.3": {
"file": "commerce/MDVA-38270_2.4.2-p1.patch"
}
}
}
}
}
127 changes: 127 additions & 0 deletions patches/commerce/MDVA-38270_2.4.2-p1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
diff --git a/vendor/magento/module-gift-card-account-graph-ql/Model/Resolver/AppliedGiftCardsToOrder.php b/vendor/magento/module-gift-card-account-graph-ql/Model/Resolver/AppliedGiftCardsToOrder.php
new file mode 100644
index 00000000000..db9932cc43c
--- /dev/null
+++ b/vendor/magento/module-gift-card-account-graph-ql/Model/Resolver/AppliedGiftCardsToOrder.php
@@ -0,0 +1,109 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\GiftCardAccountGraphQl\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;
+use Magento\Framework\Serialize\Serializer\Json;
+use Magento\GiftCardAccount\Api\GiftCardAccountManagementInterface;
+use Magento\GiftCardAccount\Api\GiftCardAccountRepositoryInterface;
+use Magento\Quote\Api\CartTotalRepositoryInterface;
+use Magento\GiftCardAccountGraphQl\Model\Money\Formatter as MoneyFormatter;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+
+/**
+ * Class AppliedGiftCardsToOrder
+ * @package Magento\GiftCardAccountGraphQl\Model\Resolver
+ */
+class AppliedGiftCardsToOrder implements ResolverInterface
+{
+ /**
+ * @var GiftCardAccountManagementInterface
+ */
+ private $giftCardAccountManagement;
+
+ /**
+ * @var CartTotalRepositoryInterface
+ */
+ private $cartTotalRepository;
+
+ /**
+ * @var Json
+ */
+ private $json;
+
+ /**
+ * @var MoneyFormatter
+ */
+ private $moneyFormatter;
+
+ /**
+ * @var GiftCardAccountRepositoryInterface
+ */
+ private $giftCardAccountRepository;
+
+ /**
+ * @var SearchCriteriaBuilder
+ */
+ private $criteriaBuilder;
+
+ /**
+ * @param GiftCardAccountManagementInterface $giftCardAccountManagement
+ * @param CartTotalRepositoryInterface $cartTotalRepository
+ * @param Json $json
+ * @param GiftCardAccountRepositoryInterface $giftCardAccountRepository
+ * @param SearchCriteriaBuilder $criteriaBuilder
+ * @param MoneyFormatter $moneyFormatter
+ */
+ public function __construct(
+ GiftCardAccountManagementInterface $giftCardAccountManagement,
+ CartTotalRepositoryInterface $cartTotalRepository,
+ Json $json,
+ GiftCardAccountRepositoryInterface $giftCardAccountRepository,
+ SearchCriteriaBuilder $criteriaBuilder,
+ MoneyFormatter $moneyFormatter
+ ) {
+ $this->giftCardAccountManagement = $giftCardAccountManagement;
+ $this->cartTotalRepository = $cartTotalRepository;
+ $this->json = $json;
+ $this->giftCardAccountRepository = $giftCardAccountRepository;
+ $this->criteriaBuilder = $criteriaBuilder;
+ $this->moneyFormatter = $moneyFormatter;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null)
+ {
+ if (!isset($value)) {
+ throw new LocalizedException(__('value should be specified'));
+ }
+
+ $store = $context->getExtensionAttributes()->getStore();
+ $order = $value['model'];
+ $gift_cards = $this->json->unserialize($order->getData('gift_cards'));
+ $result = [];
+
+ foreach ($gift_cards as $card) {
+ $gift_card_id = $card['i'];
+ $gift_card = $this->giftCardAccountRepository->get($gift_card_id);
+
+ $result[$gift_card_id] = [
+ 'code' => $card['c'],
+ 'current_balance' => $this->moneyFormatter->formatAmountAsMoney($gift_card['balance'], $store),
+ 'applied_balance' => $this->moneyFormatter->formatAmountAsMoney($card['a'], $store),
+ 'expiration_date' => $gift_card['date_expires']
+ ];
+ }
+
+ return $result;
+ }
+}
diff --git a/vendor/magento/module-gift-card-account-graph-ql/etc/schema.graphqls b/vendor/magento/module-gift-card-account-graph-ql/etc/schema.graphqls
index 85282bc48a4..e644173ed4d 100644
--- a/vendor/magento/module-gift-card-account-graph-ql/etc/schema.graphqls
+++ b/vendor/magento/module-gift-card-account-graph-ql/etc/schema.graphqls
@@ -49,3 +49,7 @@ type GiftCardAccount @doc(description: "Contains details about the gift card acc
expiration_date: String @doc(description: "Gift card expiration date")
balance: Money @doc(description: "Balance remaining on gift card")
}
+
+type OrderTotal {
+ total_giftcard: [AppliedGiftCard] @resolver(class: "\\Magento\\GiftCardAccountGraphQl\\Model\\Resolver\\AppliedGiftCardsToOrder") @doc(description: "Contains the code attribute, which specifies the applied gift card codes")
+}
Loading

0 comments on commit 1880260

Please sign in to comment.