Skip to content

Commit 23d756b

Browse files
Merge pull request #111 from magento-commerce/1.1.26-release
1.1.26 Release
2 parents b0d597c + cc43bd1 commit 23d756b

15 files changed

+981
-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.25",
5+
"version": "1.1.26",
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: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
diff --git a/vendor/magento/module-configurable-product-staging/Plugin/Catalog/UpdateConfigurationsStaging.php b/vendor/magento/module-configurable-product-staging/Plugin/Catalog/UpdateConfigurationsStaging.php
2+
index 06d0fb52db2..d5900b9436f 100644
3+
--- a/vendor/magento/module-configurable-product-staging/Plugin/Catalog/UpdateConfigurationsStaging.php
4+
+++ b/vendor/magento/module-configurable-product-staging/Plugin/Catalog/UpdateConfigurationsStaging.php
5+
@@ -15,6 +15,7 @@ use Magento\Catalog\Api\ProductRepositoryInterface;
6+
use Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper as InitializationHelper;
7+
use Magento\ConfigurableProduct\Model\Product\VariationHandler;
8+
use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
9+
+use Magento\Framework\Exception\CouldNotSaveException;
10+
use Magento\Staging\Model\VersionManager;
11+
use Magento\Staging\Api\UpdateRepositoryInterface;
12+
use Magento\CatalogStaging\Api\ProductStagingInterface;
13+
@@ -23,6 +24,7 @@ use Magento\Framework\Serialize\Serializer\Json;
14+
15+
/**
16+
* Update Configurations for configurable product
17+
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
18+
*/
19+
class UpdateConfigurationsStaging
20+
{
21+
@@ -119,11 +121,14 @@ class UpdateConfigurationsStaging
22+
$configurations = $this->variationHandler->duplicateImagesForVariations($configurations);
23+
24+
if (count($configurations) && $configurableProduct->getTypeId() === Configurable::TYPE_CODE) {
25+
- $currentId = (int) $this->versionManager->getCurrentVersion()->getId();
26+
+ $update = $this->versionManager->getCurrentVersion();
27+
+ $currentId = (int) $update->getId();
28+
if ($currentId > 1 && $currentId < VersionManager::MAX_VERSION) {
29+
- $update = $this->updateRepository->get($currentId);
30+
- $update->setIsCampaign(true);
31+
- $this->updateRepository->save($update);
32+
+ if (!$update->getIsCampaign()) {
33+
+ $update->setIsCampaign(true);
34+
+ $this->updateRepository->save($update);
35+
+ }
36+
+ $isPreview = $this->versionManager->isPreviewVersion();
37+
38+
foreach ($configurations as $productId => $productData) {
39+
/** @var Product $product */
40+
@@ -134,7 +139,7 @@ class UpdateConfigurationsStaging
41+
);
42+
$productData = $this->variationHandler->processMediaGallery($product, $productData);
43+
$product->addData($productData);
44+
- $this->productStaging->schedule($product, $currentId);
45+
+ $this->process($isPreview, $product, $currentId);
46+
}
47+
} else {
48+
foreach ($configurations as $productId => $productData) {
49+
@@ -155,6 +160,31 @@ class UpdateConfigurationsStaging
50+
return $configurableProduct;
51+
}
52+
53+
+ /**
54+
+ * Process and stage configurable child
55+
+ *
56+
+ * @param bool $isPreview
57+
+ * @param Product $product
58+
+ * @param int $currentId
59+
+ * @return void
60+
+ * @throws CouldNotSaveException
61+
+ */
62+
+ private function process(bool $isPreview, Product $product, int $currentId)
63+
+ {
64+
+ if ($isPreview || (int) $product->getCreatedIn() === $currentId) {
65+
+ $this->productStaging->schedule($product, $currentId);
66+
+ } elseif (!$this->request->getParam('staging')) {
67+
+ $product->save();
68+
+ } else {
69+
+ throw new CouldNotSaveException(
70+
+ __(
71+
+ 'The product with the SKU "%1" couldn\'t be added to the current update.',
72+
+ $product->getSku()
73+
+ )
74+
+ );
75+
+ }
76+
+ }
77+
+
78+
/**
79+
* Get configurations from request
80+
*
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
diff --git a/vendor/magento/module-company-credit/Plugin/Company/Model/DataProvider.php b/vendor/magento/module-company-credit/Plugin/Company/Model/DataProvider.php
2+
index 99b684f4663..4bc91343ef7 100644
3+
--- a/vendor/magento/module-company-credit/Plugin/Company/Model/DataProvider.php
4+
+++ b/vendor/magento/module-company-credit/Plugin/Company/Model/DataProvider.php
5+
@@ -9,6 +9,7 @@
6+
use Magento\Company\Model\Company\DataProvider as CompanyDataProvider;
7+
use Magento\CompanyCredit\Api\Data\CreditLimitInterface;
8+
use Magento\CompanyCredit\Api\CreditDataProviderInterface;
9+
+use Magento\Framework\Pricing\PriceCurrencyInterface;
10+
11+
/**
12+
* DataProvider for CompanyCredit form on a company edit page.
13+
@@ -25,24 +26,16 @@ class DataProvider
14+
*/
15+
private $storeManager;
16+
17+
- /**
18+
- * @var \Magento\Directory\Model\Currency
19+
- */
20+
- private $currencyFormatter;
21+
-
22+
/**
23+
* @param CreditDataProviderInterface $creditDataProvider
24+
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
25+
- * @param \Magento\Directory\Model\Currency $currencyFormatter
26+
*/
27+
public function __construct(
28+
CreditDataProviderInterface $creditDataProvider,
29+
- \Magento\Store\Model\StoreManagerInterface $storeManager,
30+
- \Magento\Directory\Model\Currency $currencyFormatter
31+
+ \Magento\Store\Model\StoreManagerInterface $storeManager
32+
) {
33+
$this->creditDataProvider = $creditDataProvider;
34+
$this->storeManager = $storeManager;
35+
- $this->currencyFormatter = $currencyFormatter;
36+
}
37+
38+
/**
39+
@@ -62,9 +55,11 @@ public function afterGetCompanyResultData(CompanyDataProvider $subject, array $r
40+
$creditData[CreditLimitInterface::CURRENCY_CODE] = $creditLimit->getCurrencyCode()
41+
? $creditLimit->getCurrencyCode()
42+
: $this->storeManager->getStore()->getBaseCurrency()->getCurrencyCode();
43+
- $creditData[CreditLimitInterface::CREDIT_LIMIT] = $this->currencyFormatter->formatTxt(
44+
- $creditLimit->getCreditLimit(),
45+
- ['display' => \Zend_Currency::NO_SYMBOL]
46+
+ $creditData[CreditLimitInterface::CREDIT_LIMIT] = number_format(
47+
+ (float)$creditLimit->getCreditLimit(),
48+
+ PriceCurrencyInterface::DEFAULT_PRECISION,
49+
+ '.',
50+
+ ''
51+
);
52+
} else {
53+
$creditData[CreditLimitInterface::CURRENCY_CODE] = $this->storeManager->getStore()
54+
diff --git a/vendor/magento/module-company-credit/Ui/Component/Form/AmountField.php b/vendor/magento/module-company-credit/Ui/Component/Form/AmountField.php
55+
index a69c99c6c7f..78f1fba6adc 100644
56+
--- a/vendor/magento/module-company-credit/Ui/Component/Form/AmountField.php
57+
+++ b/vendor/magento/module-company-credit/Ui/Component/Form/AmountField.php
58+
@@ -32,11 +32,6 @@ class AmountField extends Field
59+
*/
60+
private $websiteCurrency;
61+
62+
- /**
63+
- * @var \Magento\Directory\Model\Currency
64+
- */
65+
- private $currencyFormatter;
66+
-
67+
/**
68+
* @var int
69+
*/
70+
@@ -48,7 +43,6 @@ class AmountField extends Field
71+
* @param PriceCurrencyInterface $priceCurrency
72+
* @param CreditDataProviderInterface $creditDataProvider
73+
* @param \Magento\CompanyCredit\Model\WebsiteCurrency $websiteCurrency
74+
- * @param \Magento\Directory\Model\Currency $currencyFormatter
75+
* @param UiComponentInterface[] $components
76+
* @param array $data
77+
*/
78+
@@ -58,7 +52,6 @@ public function __construct(
79+
PriceCurrencyInterface $priceCurrency,
80+
CreditDataProviderInterface $creditDataProvider,
81+
\Magento\CompanyCredit\Model\WebsiteCurrency $websiteCurrency,
82+
- \Magento\Directory\Model\Currency $currencyFormatter,
83+
array $components = [],
84+
array $data = []
85+
) {
86+
@@ -66,7 +59,6 @@ public function __construct(
87+
$this->creditDataProvider = $creditDataProvider;
88+
$this->priceCurrency = $priceCurrency;
89+
$this->websiteCurrency = $websiteCurrency;
90+
- $this->currencyFormatter = $currencyFormatter;
91+
}
92+
93+
/**
94+
@@ -81,9 +73,11 @@ public function prepare()
95+
$config = $this->getData('config');
96+
$currency = $this->getCurrency();
97+
$config['addbefore'] = $this->priceCurrency->getCurrencySymbol(null, $currency);
98+
- $config['value'] = $this->currencyFormatter->formatTxt(
99+
- $this->defaultFieldValue,
100+
- ['display' => \Zend_Currency::NO_SYMBOL]
101+
+ $config['value'] = number_format(
102+
+ (float)$this->defaultFieldValue,
103+
+ PriceCurrencyInterface::DEFAULT_PRECISION,
104+
+ '.',
105+
+ ''
106+
);
107+
108+
$this->setData('config', $config);
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
diff --git a/vendor/magento/module-reward/Model/Reward.php b/vendor/magento/module-reward/Model/Reward.php
2+
index 476b9b9592c4..731d4ed3ad0c 100644
3+
--- a/vendor/magento/module-reward/Model/Reward.php
4+
+++ b/vendor/magento/module-reward/Model/Reward.php
5+
@@ -10,8 +10,6 @@
6+
use Magento\Customer\Model\Customer;
7+
8+
/**
9+
- * Reward model
10+
- *
11+
* @method int getCustomerId()
12+
* @method \Magento\Reward\Model\Reward setCustomerId(int $value)
13+
* @method \Magento\Reward\Model\Reward setWebsiteId(int $value)
14+
@@ -27,37 +25,37 @@
15+
*/
16+
class Reward extends \Magento\Framework\Model\AbstractModel
17+
{
18+
- const XML_PATH_BALANCE_UPDATE_TEMPLATE = 'magento_reward/notification/balance_update_template';
19+
+ public const XML_PATH_BALANCE_UPDATE_TEMPLATE = 'magento_reward/notification/balance_update_template';
20+
21+
- const XML_PATH_BALANCE_WARNING_TEMPLATE = 'magento_reward/notification/expiry_warning_template';
22+
+ public const XML_PATH_BALANCE_WARNING_TEMPLATE = 'magento_reward/notification/expiry_warning_template';
23+
24+
- const XML_PATH_EMAIL_IDENTITY = 'magento_reward/notification/email_sender';
25+
+ public const XML_PATH_EMAIL_IDENTITY = 'magento_reward/notification/email_sender';
26+
27+
- const XML_PATH_MIN_POINTS_BALANCE = 'magento_reward/general/min_points_balance';
28+
+ public const XML_PATH_MIN_POINTS_BALANCE = 'magento_reward/general/min_points_balance';
29+
30+
- const REWARD_ACTION_ADMIN = 0;
31+
+ public const REWARD_ACTION_ADMIN = 0;
32+
33+
- const REWARD_ACTION_ORDER = 1;
34+
+ public const REWARD_ACTION_ORDER = 1;
35+
36+
- const REWARD_ACTION_REGISTER = 2;
37+
+ public const REWARD_ACTION_REGISTER = 2;
38+
39+
- const REWARD_ACTION_NEWSLETTER = 3;
40+
+ public const REWARD_ACTION_NEWSLETTER = 3;
41+
42+
- const REWARD_ACTION_INVITATION_CUSTOMER = 4;
43+
+ public const REWARD_ACTION_INVITATION_CUSTOMER = 4;
44+
45+
- const REWARD_ACTION_INVITATION_ORDER = 5;
46+
+ public const REWARD_ACTION_INVITATION_ORDER = 5;
47+
48+
- const REWARD_ACTION_REVIEW = 6;
49+
+ public const REWARD_ACTION_REVIEW = 6;
50+
51+
- const REWARD_ACTION_ORDER_EXTRA = 8;
52+
+ public const REWARD_ACTION_ORDER_EXTRA = 8;
53+
54+
- const REWARD_ACTION_CREDITMEMO = 9;
55+
+ public const REWARD_ACTION_CREDITMEMO = 9;
56+
57+
- const REWARD_ACTION_SALESRULE = 10;
58+
+ public const REWARD_ACTION_SALESRULE = 10;
59+
60+
- const REWARD_ACTION_REVERT = 11;
61+
+ public const REWARD_ACTION_REVERT = 11;
62+
63+
- const REWARD_ACTION_CREDITMEMO_VOID = 12;
64+
+ public const REWARD_ACTION_CREDITMEMO_VOID = 12;
65+
66+
/**
67+
* Model is loaded by customer
68+
@@ -74,8 +72,6 @@ class Reward extends \Magento\Framework\Model\AbstractModel
69+
protected static $_actionModelClasses = [];
70+
71+
/**
72+
- * Rates
73+
- *
74+
* @var array
75+
*/
76+
protected $_rates = [];
77+
@@ -88,22 +84,16 @@ class Reward extends \Magento\Framework\Model\AbstractModel
78+
protected $_rewardPointsUpdated = false;
79+
80+
/**
81+
- * Reward data
82+
- *
83+
* @var \Magento\Reward\Helper\Data
84+
*/
85+
protected $_rewardData = null;
86+
87+
/**
88+
- * Reward customer
89+
- *
90+
* @var \Magento\Reward\Helper\Customer
91+
*/
92+
protected $_rewardCustomer = null;
93+
94+
/**
95+
- * Core model store manager interface
96+
- *
97+
* @var \Magento\Store\Model\StoreManagerInterface
98+
*/
99+
protected $_storeManager;
100+
@@ -114,8 +104,6 @@ class Reward extends \Magento\Framework\Model\AbstractModel
101+
protected $_localeCurrency;
102+
103+
/**
104+
- * Reward history factory
105+
- *
106+
* @var \Magento\Reward\Model\Reward\HistoryFactory
107+
*/
108+
protected $_historyFactory;
109+
@@ -237,13 +225,13 @@ protected function _construct()
110+
* @param int $actionId
111+
* @param string $actionModelClass
112+
* @return void
113+
- * @throws \Magento\Framework\Exception\LocalizedException
114+
+ * @throws LocalizedException
115+
*/
116+
// phpcs:ignore
117+
public static function setActionModelClass($actionId, $actionModelClass)
118+
{
119+
if (!is_int($actionId)) {
120+
- throw new \Magento\Framework\Exception\LocalizedException(
121+
+ throw new LocalizedException(
122+
__('The action ID you enter must be a number.')
123+
);
124+
}
125+
@@ -811,8 +799,9 @@ public function sendBalanceUpdateNotification()
126+
'update_message' => $this->getHistory()->getMessage(),
127+
'update_comment' => $history->getComment(),
128+
]
129+
- )->setFrom(
130+
- $from
131+
+ )->setFromByScope(
132+
+ $from,
133+
+ $store->getStoreId()
134+
)->addTo(
135+
$this->getCustomer()->getEmail()
136+
);

0 commit comments

Comments
 (0)