Skip to content

Commit 8d5a846

Browse files
committed
Merge remote-tracking branch 'origin/2.4-develop' into MC-25022
2 parents 3406645 + 293cd41 commit 8d5a846

File tree

35 files changed

+1141
-288
lines changed

35 files changed

+1141
-288
lines changed

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
use Magento\Framework\DataObject;
1010

1111
/**
12+
* Produce html output using the given data source.
13+
*
14+
* phpcs:disable Magento2.Classes.AbstractApi
1215
* Backend grid item abstract renderer
1316
* @api
1417
* @SuppressWarnings(PHPMD.NumberOfChildren)
@@ -53,7 +56,7 @@ public function getColumn()
5356
* Renders grid column
5457
*
5558
* @param DataObject $row
56-
* @return string
59+
* @return string
5760
*/
5861
public function render(DataObject $row)
5962
{
@@ -62,7 +65,7 @@ public function render(DataObject $row)
6265
$result .= $this->getColumn()->getEditOnly() ? ''
6366
: '<span class="admin__grid-control-value">' . $this->_getValue($row) . '</span>';
6467

65-
return $result . $this->_getInputValueElement($row) . '</div>' ;
68+
return $result . $this->_getInputValueElement($row) . '</div>';
6669
}
6770
return $this->_getValue($row);
6871
}
@@ -90,6 +93,7 @@ protected function _getValue(DataObject $row)
9093
if (is_string($getter)) {
9194
return $row->{$getter}();
9295
} elseif (is_callable($getter)) {
96+
//phpcs:ignore Magento2.Functions.DiscouragedFunction
9397
return call_user_func($getter, $row);
9498
}
9599
return '';

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@
115115
<label>Enable Template Path Hints for Storefront</label>
116116
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
117117
</field>
118-
<field id="template_hints_storefront_show_with_parameter" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
118+
<field id="template_hints_storefront_show_with_parameter" translate="label comment" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
119119
<label>Enable Hints for Storefront with URL Parameter</label>
120120
<depends>
121121
<field id="*/*/template_hints_storefront">1</field>
122122
</depends>
123123
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
124124
<comment>Use URL parameter to enable template path hints for Storefront</comment>
125125
</field>
126-
<field id="template_hints_parameter_value" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
126+
<field id="template_hints_parameter_value" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
127127
<label>Parameter Value</label>
128128
<depends>
129129
<field id="*/*/template_hints_storefront">1</field>

app/code/Magento/Backend/i18n/en_US.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,3 +461,5 @@ Pagination,Pagination
461461
"Alternative text for the next pages link in the pagination menu. If empty, default arrow image is used.","Alternative text for the next pages link in the pagination menu. If empty, default arrow image is used."
462462
"Anchor Text for Next","Anchor Text for Next"
463463
"Theme Name","Theme Name"
464+
"Use URL parameter to enable template path hints for Storefront","Use URL parameter to enable template path hints for Storefront"
465+
"Add the following parameter to the URL to show template hints ?templatehints=[parameter_value]","Add the following parameter to the URL to show template hints ?templatehints=[parameter_value]"

app/code/Magento/Braintree/view/frontend/web/js/view/payment/3d-secure.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ define([
117117
options.bin = context.paymentPayload.details.bin;
118118
}
119119

120-
if (shippingAddress) {
120+
if (shippingAddress && this.isValidShippingAddress(shippingAddress)) {
121121
options.additionalInformation = {
122122
shippingGivenName: shippingAddress.firstname,
123123
shippingSurname: shippingAddress.lastname,
@@ -206,6 +206,25 @@ define([
206206
}
207207

208208
return false;
209+
},
210+
211+
/**
212+
* Validate shipping address
213+
*
214+
* @param {Object} shippingAddress
215+
* @return {Boolean}
216+
*/
217+
isValidShippingAddress: function (shippingAddress) {
218+
var isValid = false;
219+
220+
// check that required fields are not empty
221+
if (shippingAddress.firstname && shippingAddress.lastname && shippingAddress.telephone &&
222+
shippingAddress.street && shippingAddress.city && shippingAddress.regionCode &&
223+
shippingAddress.postcode && shippingAddress.countryId) {
224+
isValid = true;
225+
}
226+
227+
return isValid;
209228
}
210229
};
211230
});

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/cc-form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ define(
9191
})
9292
.then(function (hostedFieldsInstance) {
9393
self.hostedFieldsInstance = hostedFieldsInstance;
94-
self.isPlaceOrderActionAllowed(true);
94+
self.isPlaceOrderActionAllowed(false);
9595
self.initFormValidationEvents(hostedFieldsInstance);
9696

9797
return self.hostedFieldsInstance;

app/code/Magento/Catalog/Test/Mftf/Test/CheckTierPricingOfProductsTest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<createData entity="Simple_US_Customer" stepKey="customer"/>
3737
<!--Login as admin-->
3838
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/>
39+
<createData entity="CustomerAccountSharingGlobal" stepKey="setConfigCustomerAccountToGlobal"/>
3940
</before>
4041

4142
<!--Create website, Sore adn Store View-->
@@ -328,6 +329,7 @@
328329
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="DeleteWebsite">
329330
<argument name="websiteName" value="secondWebsite"/>
330331
</actionGroup>
332+
<createData entity="CustomerAccountSharingDefault" stepKey="setConfigCustomerAccountDefault"/>
331333
<actionGroup ref="logout" stepKey="logout"/>
332334

333335
<!--Do reindex and flush cache-->

app/code/Magento/CatalogGraphQl/DataProvider/Product/SearchCriteriaBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private function addVisibilityFilter(SearchCriteriaInterface $searchCriteria, bo
123123
{
124124
if ($isFilter && $isSearch) {
125125
// Index already contains products filtered by visibility: catalog, search, both
126-
return ;
126+
return;
127127
}
128128
$visibilityIds = $isSearch
129129
? $this->visibility->getVisibleInSearchIds()

app/code/Magento/Cms/Model/ResourceModel/Block.php

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,9 @@ public function getIsUniqueBlockToStores(AbstractModel $object)
185185
$entityMetadata = $this->metadataPool->getMetadata(BlockInterface::class);
186186
$linkField = $entityMetadata->getLinkField();
187187

188-
$stores = (array)$object->getData('store_id');
189-
$isDefaultStore = $this->_storeManager->isSingleStoreMode()
190-
|| array_search(Store::DEFAULT_STORE_ID, $stores) !== false;
191-
192-
if (!$isDefaultStore) {
193-
$stores[] = Store::DEFAULT_STORE_ID;
194-
}
188+
$stores = $this->_storeManager->isSingleStoreMode()
189+
? [Store::DEFAULT_STORE_ID]
190+
: (array)$object->getData('store_id');
195191

196192
$select = $this->getConnection()->select()
197193
->from(['cb' => $this->getMainTable()])
@@ -200,11 +196,8 @@ public function getIsUniqueBlockToStores(AbstractModel $object)
200196
'cb.' . $linkField . ' = cbs.' . $linkField,
201197
[]
202198
)
203-
->where('cb.identifier = ? ', $object->getData('identifier'));
204-
205-
if (!$isDefaultStore) {
206-
$select->where('cbs.store_id IN (?)', $stores);
207-
}
199+
->where('cb.identifier = ? ', $object->getData('identifier'))
200+
->where('cbs.store_id IN (?)', $stores);
208201

209202
if ($object->getId()) {
210203
$select->where('cb.' . $entityMetadata->getIdentifierField() . ' <> ?', $object->getId());

app/code/Magento/Cms/Test/Mftf/Test/CheckStaticBlocksTest.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,23 @@
5656
<seeInCurrentUrl url="cms/block/new" stepKey="VerifyNewBlockPageIsOpened1"/>
5757
<!--Add new BLock with the same data-->
5858
<actionGroup ref="FillOutBlockContent" stepKey="FillOutBlockContent1"/>
59-
<selectOption selector="{{BlockNewPageBasicFieldsSection.storeView}}" userInput="Default Store View" stepKey="selectDefaultStoreView" />
60-
<selectOption selector="{{BlockNewPageBasicFieldsSection.storeView}}" userInput="{{customStore.name}}" stepKey="selectSecondStoreView1" />
6159
<click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="ClickToSaveBlock1"/>
6260
<waitForPageLoad stepKey="waitForPageLoad6"/>
6361
<!--Verify that corresponding message is displayed-->
6462
<see userInput="A block identifier with the same properties already exists in the selected store." stepKey="VerifyBlockIsSaved1"/>
63+
<!--Click to go back and add new block-->
64+
<click selector="{{BlockNewPagePageActionsSection.back}}" stepKey="ClickToGoBack1"/>
65+
<waitForPageLoad stepKey="waitForPageLoad7"/>
66+
<click selector="{{BlockPageActionsSection.addNewBlock}}" stepKey="ClickToAddNewBlock2"/>
67+
<waitForPageLoad stepKey="waitForPageLoad8"/>
68+
<seeInCurrentUrl url="cms/block/new" stepKey="VerifyNewBlockPageIsOpened2"/>
69+
<!--Add new BLock with the same data for another store view-->
70+
<actionGroup ref="FillOutBlockContent" stepKey="FillOutBlockContent2"/>
71+
<selectOption selector="{{BlockNewPageBasicFieldsSection.storeView}}" userInput="Default Store View" stepKey="selectDefaultStoreView" />
72+
<selectOption selector="{{BlockNewPageBasicFieldsSection.storeView}}" userInput="{{customStore.name}}" stepKey="selectSecondStoreView1" />
73+
<click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="ClickToSaveBlock2"/>
74+
<waitForPageLoad stepKey="waitForPageLoad9"/>
75+
<see userInput="You saved the block." stepKey="VerifyBlockIsSaved2"/>
6576

6677
<after>
6778
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="DeleteWebsite">

app/code/Magento/Csp/Model/Collector/CspWhitelistXml/SchemaLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class SchemaLocator implements SchemaLocatorInterface
2222
*
2323
* @var string
2424
*/
25-
private $schema ;
25+
private $schema;
2626

2727
/**
2828
* @param Reader $moduleReader

0 commit comments

Comments
 (0)