+
+
+
+
+
+ getFieldValue('use_config_manage_stock') || $block->isNew()) ? 'checked="checked"' : '' ?>
+
+ onclick="toggleValueElements(this, this.parentNode);" = /* @noEscape */ $_readonly ?>>
+
+ isReadonly()) :?>
+
+
+
+ isSingleStoreMode()) :?>
+
= $block->escapeHtml(__('[GLOBAL]')) ?>
+
+
-getProduct()->isComposite()): ?>
-
-
-
-
-
-
- >
-
- isSingleStoreMode()): ?>
-
= /* @escapeNotVerified */ __('[GLOBAL]') ?>
-
-
+ getProduct()->isComposite()) :?>
+
+
+
+
+
+
+ >
+
+ isSingleStoreMode()) :?>
+
= $block->escapeHtml(__('[GLOBAL]')) ?>
+
+
-
-
-
-
>
+
+
+
- isSingleStoreMode()): ?>
-
= /* @escapeNotVerified */ __('[GLOBAL]') ?>
-
-
+ isReadonly()) :?>
+
+
+
+ isSingleStoreMode()) :?>
+
= $block->escapeHtml(__('[GLOBAL]')) ?>
+
+
-
-
-
- isSingleStoreMode()): ?>
-
= /* @escapeNotVerified */ __('[GLOBAL]') ?>
-
-
+
+
+
+ isSingleStoreMode()) :?>
+
= $block->escapeHtml(__('[GLOBAL]')) ?>
+
+
-
-
-
- isSingleStoreMode()): ?>
-
= /* @escapeNotVerified */ __('[GLOBAL]') ?>
-
-
+
+
+
+ isSingleStoreMode()) :?>
+
= $block->escapeHtml(__('[GLOBAL]')) ?>
+
+
- canUseQtyDecimals()): ?>
-
-
-
-
-
- isSingleStoreMode()): ?>
-
= /* @escapeNotVerified */ __('[GLOBAL]') ?>
-
-
+ canUseQtyDecimals()) :?>
+
+
+
+
+
+ isSingleStoreMode()) :?>
+
= $block->escapeHtml(__('[GLOBAL]')) ?>
+
+
- isVirtual()) : ?>
-
-
-
-
-
- isSingleStoreMode()): ?>
-
= /* @escapeNotVerified */ __('[GLOBAL]') ?>
+ isVirtual()) :?>
+
+
+
+
+
+ isSingleStoreMode()) :?>
+
= $block->escapeHtml(__('[GLOBAL]')) ?>
+
+
+
-
-
-
-
-
-
-
+
+
+
+
-
- getFieldValue('use_config_backorders') || $block->isNew()) ? 'checked="checked"' : '' ?>
- onclick="toggleValueElements(this, this.parentNode);" = /* @escapeNotVerified */ $_readonly ?>>
-
-
- isReadonly()): ?>
-
-
-
- isSingleStoreMode()): ?>
-
= /* @escapeNotVerified */ __('[GLOBAL]') ?>
-
-
+
+ getFieldValue('use_config_backorders') || $block->isNew()) ? 'checked="checked"' : '' ?>
+
+ onclick="toggleValueElements(this, this.parentNode);" = /* @noEscape */ $_readonly ?>>
+
+
+ isReadonly()) :?>
+
+
+
+ isSingleStoreMode()) :?>
+
= $block->escapeHtml(__('[GLOBAL]')) ?>
+
+
-
-
-
-
>
+
+
+
- isSingleStoreMode()): ?>
-
= /* @escapeNotVerified */ __('[GLOBAL]') ?>
-
-
+
+ getFieldValue('use_config_notify_stock_qty') || $block->isNew()) ? 'checked="checked"' : '' ?>
+
+ onclick="toggleValueElements(this, this.parentNode);" = /* @noEscape */ $_readonly ?>>
+
+
+ isReadonly()) :?>
+
+
+
+ isSingleStoreMode()) :?>
+
= $block->escapeHtml(__('[GLOBAL]')) ?>
+
+
-
-
-
-
- getFieldValue('enable_qty_increments'); ?>
-
-
+
+
+
+
+ getFieldValue('enable_qty_increments'); ?>
+
+
-
+ isSingleStoreMode()) :?>
+
= $block->escapeHtml(__('[GLOBAL]')) ?>
+
- isReadonly()): ?>
-
-
-
- isSingleStoreMode()): ?>
-
= /* @escapeNotVerified */ __('[GLOBAL]') ?>
-
-
-
-
-
-
>
-
- getFieldValue('use_config_qty_increments') || $block->isNew()) ? 'checked="checked"' : '' ?>
-
onclick="toggleValueElements(this, this.parentNode);" = /* @escapeNotVerified */ $_readonly ?>>
-
+
+
+
+ isSingleStoreMode()) :?>
+
= $block->escapeHtml(__('[GLOBAL]')) ?>
+
- isReadonly()): ?>
-
-
-
- isSingleStoreMode()): ?>
-
= /* @escapeNotVerified */ __('[GLOBAL]') ?>
-
-
-
-
-
-
+
+
+
+
+
+ isSingleStoreMode()) :?>
+
= $block->escapeHtml(__('[GLOBAL]')) ?>
+
+
- isSingleStoreMode()): ?>
-
= /* @escapeNotVerified */ __('[GLOBAL]') ?>
-
-
-
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/wysiwyg/js.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/wysiwyg/js.phtml
index ed380722d8b43..d4a7687a0934b 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/wysiwyg/js.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/wysiwyg/js.phtml
@@ -3,8 +3,6 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-
-// @codingStandardsIgnoreFile
?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/rss/grid/link.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/rss/grid/link.phtml
index fb450d19312fa..668dc4a28a6d9 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/rss/grid/link.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/rss/grid/link.phtml
@@ -4,10 +4,8 @@
* See COPYING.txt for license details.
*/
-// @codingStandardsIgnoreFile
-
/** @var $block \Magento\Catalog\Block\Adminhtml\Rss\Grid\Link */
?>
-isRssAllowed() && $block->getLink()): ?>
-
= /* @escapeNotVerified */ $block->getLabel() ?>
+isRssAllowed() && $block->getLink()) :?>
+
= $block->escapeHtml($block->getLabel()) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js b/app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js
index 561e23b974462..157879041cd66 100644
--- a/app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js
+++ b/app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js
@@ -37,8 +37,8 @@ define([
ajax: {
url: options.url,
type: 'POST',
- success: $.proxy(function (node) {
- return this._convertData(node[0]);
+ success: $.proxy(function (nodes) {
+ return this._convertDataNodes(nodes);
}, this),
/**
@@ -77,6 +77,21 @@ define([
}
},
+ /**
+ * @param {Array} nodes
+ * @returns {Array}
+ * @private
+ */
+ _convertDataNodes: function (nodes) {
+ var nodesData = [];
+
+ nodes.forEach(function (node) {
+ nodesData.push(this._convertData(node));
+ }, this);
+
+ return nodesData;
+ },
+
/**
* @param {Object} node
* @return {*}
diff --git a/app/code/Magento/Catalog/view/base/templates/js/components.phtml b/app/code/Magento/Catalog/view/base/templates/js/components.phtml
index bad5acc209b5f..13f44b97fc789 100644
--- a/app/code/Magento/Catalog/view/base/templates/js/components.phtml
+++ b/app/code/Magento/Catalog/view/base/templates/js/components.phtml
@@ -4,7 +4,6 @@
* See COPYING.txt for license details.
*/
-// @codingStandardsIgnoreFile
-
+// phpcs:disable PSR2.Files.ClosingTag
?>
= $block->getChildHtml() ?>
diff --git a/app/code/Magento/Catalog/view/base/templates/product/composite/fieldset/options/view/checkable.phtml b/app/code/Magento/Catalog/view/base/templates/product/composite/fieldset/options/view/checkable.phtml
index 0e2635f27c4b9..55c8a8fcb4edd 100644
--- a/app/code/Magento/Catalog/view/base/templates/product/composite/fieldset/options/view/checkable.phtml
+++ b/app/code/Magento/Catalog/view/base/templates/product/composite/fieldset/options/view/checkable.phtml
@@ -4,11 +4,10 @@
* See COPYING.txt for license details.
*/
-// @codingStandardsIgnoreFile
use Magento\Catalog\Model\Product\Option;
/**
- * @var \Magento\Catalog\Block\Product\View\Options\Type\Select\Checkable $block
+ * @var $block \Magento\Catalog\Block\Product\View\Options\Type\Select\Checkable
*/
$option = $block->getOption();
if ($option) : ?>
@@ -19,82 +18,64 @@ if ($option) : ?>
$count = 1;
?>
-
- getIsRequire()): ?>
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml
index ce1561e382eed..b2c2acb7419bd 100644
--- a/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml
+++ b/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml
@@ -3,29 +3,26 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-
-// @codingStandardsIgnoreFile
-
?>
-
+
-
getSchema() ? ' itemprop="offers" itemscope itemtype="http://schema.org/Offer"' : '' ?>>
- getDisplayLabel()): ?>
- = /* @escapeNotVerified */ $block->getDisplayLabel() ?>
+ getDisplayLabel()) :?>
+ = $block->escapeHtml($block->getDisplayLabel()) ?>
- getPriceId()): ?> id="= /* @escapeNotVerified */ $block->getPriceId() ?>"
- = ($block->getPriceDisplayLabel()) ? 'data-label="' . $block->getPriceDisplayLabel() . $block->getPriceDisplayInclExclTaxes() . '"' : '' ?>
- data-price-amount="= /* @escapeNotVerified */ $block->getDisplayValue() ?>"
- data-price-type="= /* @escapeNotVerified */ $block->getPriceType() ?>"
- class="price-wrapper = /* @escapeNotVerified */ $block->getPriceWrapperCss() ?>"
- >= /* @escapeNotVerified */ $block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer()) ?>
- hasAdjustmentsHtml()): ?>
+ getPriceId()) :?> id="= $block->escapeHtmlAttr($block->getPriceId()) ?>"
+ = ($block->getPriceDisplayLabel()) ? 'data-label="' . $block->escapeHtmlAttr($block->getPriceDisplayLabel() . $block->getPriceDisplayInclExclTaxes()) . '"' : '' ?>
+ data-price-amount="= $block->escapeHtmlAttr($block->getDisplayValue()) ?>"
+ data-price-type="= $block->escapeHtmlAttr($block->getPriceType()) ?>"
+ class="price-wrapper = $block->escapeHtmlAttr($block->getPriceWrapperCss()) ?>"
+ >= $block->escapeHtml($block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer()), ['span']) ?>
+ hasAdjustmentsHtml()) :?>
= $block->getAdjustmentsHtml() ?>
- getSchema()): ?>
-
-
+ getSchema()) :?>
+
+
diff --git a/app/code/Magento/Catalog/view/base/templates/product/price/default.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/default.phtml
index b414f02a3d6fb..84a1153bea67a 100644
--- a/app/code/Magento/Catalog/view/base/templates/product/price/default.phtml
+++ b/app/code/Magento/Catalog/view/base/templates/product/price/default.phtml
@@ -3,19 +3,18 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-
-// @codingStandardsIgnoreFile
-
?>
getPriceType('regular_price');
-/* @escapeNotVerified */ echo $block->renderAmount($priceModel->getAmount(), [
+/* @noEscape */ echo $block->renderAmount($priceModel->getAmount(), [
'price_id' => $block->getPriceId('product-price-'),
'include_container' => true
]);
diff --git a/app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml
index 6e281bdef7afb..e56804a06de22 100644
--- a/app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml
+++ b/app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml
@@ -3,9 +3,6 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-
-// @codingStandardsIgnoreFile
-
?>
getPriceType('final_price');
$idSuffix = $block->getIdSuffix() ? $block->getIdSuffix() : '';
$schema = ($block->getZone() == 'item_view') ? true : false;
?>
-hasSpecialPrice()): ?>
+hasSpecialPrice()) :?>
- renderAmount($finalPriceModel->getAmount(), [
+ = /* @noEscape */ $block->renderAmount($finalPriceModel->getAmount(), [
'display_label' => __('Special Price'),
'price_id' => $block->getPriceId('product-price-' . $idSuffix),
'price_type' => 'finalPrice',
@@ -32,7 +29,7 @@ $schema = ($block->getZone() == 'item_view') ? true : false;
]); ?>
- renderAmount($priceModel->getAmount(), [
+ = /* @noEscape */ $block->renderAmount($priceModel->getAmount(), [
'display_label' => __('Regular Price'),
'price_id' => $block->getPriceId('old-price-' . $idSuffix),
'price_type' => 'oldPrice',
@@ -40,8 +37,8 @@ $schema = ($block->getZone() == 'item_view') ? true : false;
'skip_adjustments' => true
]); ?>
-
- renderAmount($finalPriceModel->getAmount(), [
+
+ = /* @noEscape */ $block->renderAmount($finalPriceModel->getAmount(), [
'price_id' => $block->getPriceId('product-price-' . $idSuffix),
'price_type' => 'finalPrice',
'include_container' => true,
@@ -49,14 +46,14 @@ $schema = ($block->getZone() == 'item_view') ? true : false;
]); ?>
-showMinimalPrice()): ?>
- getUseLinkForAsLowAs()):?>
-
- = /* @escapeNotVerified */ $block->renderAmountMinimal() ?>
+showMinimalPrice()) :?>
+ getUseLinkForAsLowAs()) :?>
+
+ = /* @noEscape */ $block->renderAmountMinimal() ?>
-
+
- = /* @escapeNotVerified */ $block->renderAmountMinimal() ?>
+ = /* @noEscape */ $block->renderAmountMinimal() ?>
diff --git a/app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml
index c2b7fb4e60855..5949b54268a62 100644
--- a/app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml
+++ b/app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml
@@ -3,12 +3,12 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-
-// @codingStandardsIgnoreFile
-
?>
getPriceType('msrp_price')->isShowPriceOnGesture();
$product = $block->getSaleableItem();
?>
-
- $price) : ?>
- -
- escapeHtmlAttr(($block->hasListClass() ? $block->getListClass() : 'prices-tier items')) ?>">
+ $price) : ?>
+
-
+ getId();
$isSaleable = $product->isSaleable();
$popupId = 'msrp-popup-' . $productId . $block->getRandomString(20);
- if ($msrpShowOnGesture && $price['price']->getValue() < $product->getMsrp()):
+ if ($msrpShowOnGesture && $price['price']->getValue() < $product->getMsrp()) :
$addToCartUrl = '';
if ($isSaleable) {
- $addToCartUrl = $this->helper('\Magento\Checkout\Helper\Cart')
+ $addToCartUrl = $this->helper(\Magento\Checkout\Helper\Cart::class)
->getAddUrl($product, ['qty' => $price['price_qty']]);
}
$tierPriceData = [
@@ -54,13 +54,13 @@ $product = $block->getSaleableItem();
if ($block->getCanDisplayQty($product)) {
$tierPriceData['qty'] = $price['price_qty'];
}
- ?>
- = /* @escapeNotVerified */ __('Buy %1 for: ', $price['price_qty']) ?>
-
-
+ = $block->escapeHtml(__('Buy %1 for: ', $price['price_qty'])) ?>
+
+ renderAmount(
$price['price'],
[
@@ -70,22 +70,22 @@ $product = $block->getSaleableItem();
'zone' => \Magento\Framework\Pricing\Render::ZONE_ITEM_OPTION
]
);
- ?>
- getShowDetailedPrice() !== false)
- ? __(
- 'Buy %1 for %2 each and save %4%',
- $price['price_qty'],
- $priceAmountBlock,
- $index,
- $block->formatPercent($price['percentage_value'] ?? $tierPriceModel->getSavePercent($price['price']))
- )
- : __('Buy %1 for %2 each', $price['price_qty'], $priceAmountBlock);
- ?>
-
-
-
+ ?>
+ = /* @noEscape */ ($block->getShowDetailedPrice() !== false)
+ ? __(
+ 'Buy %1 for %2 each and save %4%',
+ $price['price_qty'],
+ $priceAmountBlock,
+ $index,
+ $block->formatPercent($price['percentage_value'] ?? $tierPriceModel->getSavePercent($price['price']))
+ )
+ : __('Buy %1 for %2 each', $price['price_qty'], $priceAmountBlock);
+ ?>
+
+
+
-
+
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml
index a70ceadd12244..2cf2399e38af0 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml
@@ -4,14 +4,16 @@
* See COPYING.txt for license details.
*/
-// @codingStandardsIgnoreFile
+// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
+// phpcs:disable PSR2.ControlStructures.SwitchDeclaration
+// phpcs:disable Generic.WhiteSpace.ScopeIndent
/* @var $block \Magento\Catalog\Block\Product\Compare\ListCompare */
?>
getItems()->getSize() ?>
-
-
- = /* @escapeNotVerified */ __('Print This Page') ?>
+
+
+ = $block->escapeHtml(__('Print This Page')) ?>
- = /* @escapeNotVerified */ __('Compare Products') ?>
+ = $block->escapeHtml(__('Compare Products')) ?>
- getItems() as $item): ?>
-
- = /* @escapeNotVerified */ __('Remove Product') ?> |
+ getItems() as $item) :?>
+
+ = $block->escapeHtml(__('Remove Product')) ?> |
- helper(\Magento\Catalog\Helper\Product\Compare::class);?>
-
- = /* @escapeNotVerified */ __('Remove Product') ?>
+ helper(Magento\Catalog\Helper\Product\Compare::class);?>
+
+ = $block->escapeHtml(__('Remove Product')) ?>
|
@@ -42,44 +44,54 @@
- helper(\Magento\Catalog\Helper\Output::class); ?>
+ helper(Magento\Catalog\Helper\Output::class); ?>
- getItems() as $item): ?>
-
- = /* @escapeNotVerified */ __('Product') ?> |
+ getItems() as $item) :?>
+
+
+ = $block->escapeHtml(__('Product')) ?>
+ |
-
-
+ |
+
= $block->getImage($item, 'product_comparison_list')->toHtml() ?>
-
- = /* @escapeNotVerified */ $helper->productAttribute($item, $item->getName(), 'name') ?>
+
+ = /* @noEscape */ $helper->productAttribute($item, $item->getName(), 'name') ?>
= $block->getReviewsSummaryHtml($item, 'short') ?>
- = /* @escapeNotVerified */ $block->getProductPrice($item, '-compare-list-top') ?>
+ = /* @noEscape */ $block->getProductPrice($item, '-compare-list-top') ?>
- isSaleable()): ?>
-
-
- getIsSalable()): ?>
- = /* @escapeNotVerified */ __('In stock') ?>
-
- = /* @escapeNotVerified */ __('Out of stock') ?>
+
+ getIsSalable()) :?>
+ = $block->escapeHtml(__('In stock')) ?>
+
+ = $block->escapeHtml(__('Out of stock')) ?>
- helper(\Magento\Wishlist\Helper\Data::class)->isAllow()) : ?>
+ helper(Magento\Wishlist\Helper\Data::class)->isAllow()) :?>
@@ -89,12 +101,12 @@
|
- getAttributes() as $attribute): ?>
+ getAttributes() as $attribute) :?>
- hasAttributeValueForProducts($attribute)): ?>
+ hasAttributeValueForProducts($attribute)) :?>
- getItems() as $item): ?>
-
+ getItems() as $item) :?>
+
= $block->escapeHtml($attribute->getStoreLabel() ? $attribute->getStoreLabel() : __($attribute->getFrontendLabel())) ?>
@@ -105,18 +117,18 @@
getAttributeCode()) {
case "price": ?>
- getProductPrice(
- $item,
- '-compare-list-' . $attribute->getCode()
- )
+ =
+ /* @noEscape */ $block->getProductPrice(
+ $item,
+ '-compare-list-' . $attribute->getCode()
+ )
?>
getImage($item, 'product_small_image')->toHtml(); ?>
- = /* @escapeNotVerified */ $helper->productAttribute($item, $block->getProductAttributeValue($item, $attribute), $attribute->getAttributeCode()) ?>
+ = /* @noEscape */ $helper->productAttribute($item, $block->getProductAttributeValue($item, $attribute), $attribute->getAttributeCode()) ?>
@@ -128,7 +140,7 @@
|
- isRedirectToCartEnabled()) : ?>
+ isRedirectToCartEnabled()) :?>
-
-
= /* @escapeNotVerified */ __('You have no items to compare.') ?>
+
+
= $block->escapeHtml(__('You have no items to compare.')) ?>
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/compare/sidebar.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/compare/sidebar.phtml
index 8daa342454445..809ddc5c61701 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/compare/sidebar.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/compare/sidebar.phtml
@@ -4,12 +4,13 @@
* See COPYING.txt for license details.
*/
-// @codingStandardsIgnoreFile
+// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
+
/* @var $block \Magento\Framework\View\Element\Template */
?>
-
= /* @escapeNotVerified */ __('You have no items to compare.') ?>
+
= $block->escapeHtml(__('You have no items to compare.')) ?>
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml
index 6133d55d676c3..ded0b7601232f 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml
@@ -4,42 +4,48 @@
* See COPYING.txt for license details.
*/
-// @codingStandardsIgnoreFile
-
/** @var \Magento\Catalog\Block\Product\Gallery $block */
?>
getImageWidth(); ?>
-