Skip to content

Commit ab775cf

Browse files
Merge pull request #146 from magento-commerce/1.1.41-release
1.1.41 Release
2 parents 604135b + d10d1d6 commit ab775cf

18 files changed

+2016
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/quality-patches",
33
"description": "Provides quality patches for AdobeCommerce & Magento OpenSource",
44
"type": "magento2-component",
5-
"version": "1.1.40",
5+
"version": "1.1.41",
66
"license": "proprietary",
77
"repositories": {
88
"repo": {

patches-info.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
diff --git a/vendor/magento/module-async-order/Model/CartRepository.php b/vendor/magento/module-async-order/Model/CartRepository.php
2+
index 3f6946c483c..59c39a567b9 100644
3+
--- a/vendor/magento/module-async-order/Model/CartRepository.php
4+
+++ b/vendor/magento/module-async-order/Model/CartRepository.php
5+
@@ -9,6 +9,7 @@ declare(strict_types=1);
6+
namespace Magento\AsyncOrder\Model;
7+
8+
use Magento\Framework\Api\SearchCriteriaInterface;
9+
+use Magento\Framework\App\DeploymentConfig;
10+
use Magento\Quote\Api\CartRepositoryInterface;
11+
use Magento\Quote\Api\Data\CartInterface;
12+
use Magento\Quote\Model\QuoteRepository;
13+
@@ -23,15 +24,23 @@ class CartRepository implements CartRepositoryInterface
14+
*/
15+
private $quoteRepository;
16+
17+
+ /**
18+
+ * @var DeploymentConfig
19+
+ */
20+
+ private DeploymentConfig $deploymentConfig;
21+
+
22+
/**
23+
* Constructor
24+
*
25+
* @param QuoteRepository $quoteRepository
26+
+ * @param DeploymentConfig $deploymentConfig
27+
*/
28+
public function __construct(
29+
- QuoteRepository $quoteRepository
30+
+ QuoteRepository $quoteRepository,
31+
+ DeploymentConfig $deploymentConfig
32+
) {
33+
$this->quoteRepository = $quoteRepository;
34+
+ $this->deploymentConfig = $deploymentConfig;
35+
}
36+
37+
/**
38+
@@ -55,6 +64,9 @@ class CartRepository implements CartRepositoryInterface
39+
*/
40+
public function getActive($cartId, array $sharedStoreIds = [])
41+
{
42+
+ if (!$this->deploymentConfig->get(OrderManagement::ASYNC_ORDER_OPTION_PATH)) {
43+
+ return $this->quoteRepository->getActive($cartId, $sharedStoreIds);
44+
+ }
45+
return $this->get($cartId, $sharedStoreIds);
46+
}
47+
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
diff --git a/vendor/magento/module-advanced-sales-rule/Model/Rule/Condition/FilterTextGenerator/Product/Attribute.php b/vendor/magento/module-advanced-sales-rule/Model/Rule/Condition/FilterTextGenerator/Product/Attribute.php
2+
index 4e90156..cd2b85f 100644
3+
--- a/vendor/magento/module-advanced-sales-rule/Model/Rule/Condition/FilterTextGenerator/Product/Attribute.php
4+
+++ b/vendor/magento/module-advanced-sales-rule/Model/Rule/Condition/FilterTextGenerator/Product/Attribute.php
5+
@@ -7,6 +7,10 @@ namespace Magento\AdvancedSalesRule\Model\Rule\Condition\FilterTextGenerator\Pro
6+
7+
use Magento\AdvancedSalesRule\Model\Rule\Condition\ConcreteCondition\Product\Attribute as AttributeCondition;
8+
use Magento\AdvancedRule\Model\Condition\FilterTextGeneratorInterface;
9+
+use Magento\Catalog\Model\Product;
10+
+use Magento\Eav\Model\Config;
11+
+use Magento\Eav\Model\Entity\Attribute\AbstractAttribute;
12+
+use Magento\Framework\Locale\FormatInterface;
13+
14+
class Attribute implements FilterTextGeneratorInterface
15+
{
16+
@@ -16,28 +20,48 @@ class Attribute implements FilterTextGeneratorInterface
17+
protected $attributeCode;
18+
19+
/**
20+
+ * @var FormatInterface
21+
+ */
22+
+ private FormatInterface $localeFormat;
23+
+
24+
+ /**
25+
+ * @var Config
26+
+ */
27+
+ private Config $config;
28+
+
29+
+ /**
30+
* @param array $data
31+
+ * @param Config $config
32+
+ * @param FormatInterface $localeFormat
33+
*/
34+
- public function __construct(array $data)
35+
- {
36+
+ public function __construct(
37+
+ array $data,
38+
+ Config $config,
39+
+ FormatInterface $localeFormat
40+
+ ) {
41+
$this->attributeCode = $data['attribute'];
42+
+ $this->config = $config;
43+
+ $this->localeFormat = $localeFormat;
44+
}
45+
46+
/**
47+
- * @param \Magento\Framework\DataObject $quoteAddress
48+
- * @return string[]
49+
+ * @inheritdoc
50+
*/
51+
public function generateFilterText(\Magento\Framework\DataObject $quoteAddress)
52+
{
53+
$filterText = [];
54+
if ($quoteAddress instanceof \Magento\Quote\Model\Quote\Address) {
55+
$items = $quoteAddress->getAllItems();
56+
+ $attribute = $this->getAttributeObject();
57+
foreach ($items as $item) {
58+
$product = $item->getProduct();
59+
if (!$product->hasData($this->attributeCode)) {
60+
$product->load($product->getId());
61+
}
62+
$value = $product->getData($this->attributeCode);
63+
+ if ($attribute && $attribute->getBackendType() === 'decimal') {
64+
+ $value = $this->localeFormat->getNumber($value);
65+
+ }
66+
if (is_scalar($value)) {
67+
$text = AttributeCondition::FILTER_TEXT_PREFIX . $this->attributeCode . ':' . $value;
68+
if (!in_array($text, $filterText)) {
69+
@@ -48,4 +72,20 @@ class Attribute implements FilterTextGeneratorInterface
70+
}
71+
return $filterText;
72+
}
73+
+
74+
+ /**
75+
+ * Retrieve attribute object
76+
+ *
77+
+ * @return ?AbstractAttribute
78+
+ */
79+
+ private function getAttributeObject(): ?AbstractAttribute
80+
+ {
81+
+ try {
82+
+ $attributeObject = $this->config->getAttribute(Product::ENTITY, $this->attributeCode);
83+
+ } catch (\Exception $e) {
84+
+ $attributeObject = null;
85+
+ }
86+
+
87+
+ return $attributeObject;
88+
+ }
89+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
diff --git a/vendor/magento/module-purchase-order/Model/Validator/ActionReady/PlaceOrderValidator.php b/vendor/magento/module-purchase-order/Model/Validator/ActionReady/PlaceOrderValidator.php
2+
index 69e1169e080c..d3b0cbe8bd9f 100644
3+
--- a/vendor/magento/module-purchase-order/Model/Validator/ActionReady/PlaceOrderValidator.php
4+
+++ b/vendor/magento/module-purchase-order/Model/Validator/ActionReady/PlaceOrderValidator.php
5+
@@ -20,6 +20,7 @@ class PlaceOrderValidator implements ValidatorInterface
6+
public function validate(PurchaseOrderInterface $purchaseOrder): bool
7+
{
8+
$status = $purchaseOrder->getStatus();
9+
+ $quote = $purchaseOrder->getSnapshotQuote();
10+
$placeOrderStatuses = [
11+
PurchaseOrderInterface::STATUS_APPROVED,
12+
PurchaseOrderInterface::STATUS_ORDER_FAILED
13+
@@ -27,6 +28,7 @@ public function validate(PurchaseOrderInterface $purchaseOrder): bool
14+
if (!in_array($status, $placeOrderStatuses)
15+
|| (null != $purchaseOrder->getOrderId())
16+
|| !$purchaseOrder->getQuoteId()
17+
+ || $quote->getHasError()
18+
) {
19+
return false;
20+
}
21+
diff --git a/vendor/magento/module-purchase-order/view/frontend/templates/purchaseorder/view/info/buttons.phtml b/vendor/magento/module-purchase-order/view/frontend/templates/purchaseorder/view/info/buttons.phtml
22+
index 6310f5164a92..e6dbcaa6d86b 100644
23+
--- a/vendor/magento/module-purchase-order/view/frontend/templates/purchaseorder/view/info/buttons.phtml
24+
+++ b/vendor/magento/module-purchase-order/view/frontend/templates/purchaseorder/view/info/buttons.phtml
25+
@@ -47,9 +47,11 @@
26+
<?php if ($block->paymentRequired()): ?>
27+
<input type="hidden" name="payment_redirect" value="1">
28+
<?php endif; ?>
29+
+ <?php if (!$block->hasError()): ?>
30+
<button type="submit" class="action placeorder primary">
31+
<span><?= $escaper->escapeHtml(__('Place Order')) ?></span>
32+
</button>
33+
+ <?php endif; ?>
34+
</form>
35+
<?php endif; ?>
36+

0 commit comments

Comments
 (0)