diff --git a/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml b/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml index 7ee04bf192f29..82b5299639ef9 100644 --- a/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml +++ b/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml @@ -3,11 +3,17 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); -/** @var \Magento\Framework\View\Element\Template $block */ -/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */ -?> -escapeJs($block->getJsObjectName())}.url + '?ajax=true' + urlParams; + var url = {$escaper->escapeJs($block->getJsObjectName())}.url + '?ajax=true' + urlParams; new Ajax.Updater( - {$block->escapeJs($block->getJsObjectName())}.containerId, + {$escaper->escapeJs($block->getJsObjectName())}.containerId, url, { parameters: {form_key: FORM_KEY}, - onComplete: {$block->escapeJs($block->getJsObjectName())}.initGrid - .bind({$block->escapeJs($block->getJsObjectName())}), + onComplete: {$escaper->escapeJs($block->getJsObjectName())}.initGrid + .bind({$escaper->escapeJs($block->getJsObjectName())}), evalScripts:true } ); @@ -51,7 +57,7 @@ var self = this; confirm({ - content: '{$block->escapeJs(__('Are you sure you want to remove this item?'))}', + content: '{$escaper->escapeJs(__('Are you sure you want to remove this item?'))}', actions: { confirm: function () { self.reload('&delete=' + itemId); @@ -64,8 +70,8 @@ productConfigure.addListType( 'wishlist', { - urlFetch: '{$block->escapeJs($block->getUrl('customer/wishlist_product_composite_wishlist/configure'))}', - urlConfirm: '{$block->escapeJs($block->getUrl('customer/wishlist_product_composite_wishlist/update'))}' + urlFetch: '{$escaper->escapeJs($block->getUrl('customer/wishlist_product_composite_wishlist/configure'))}', + urlConfirm: '{$escaper->escapeJs($block->getUrl('customer/wishlist_product_composite_wishlist/update'))}' } ); //--> diff --git a/app/code/Magento/Wishlist/view/base/templates/product/price/bundle/configured_price.phtml b/app/code/Magento/Wishlist/view/base/templates/product/price/bundle/configured_price.phtml index 260dd5a24396a..b611386943d5b 100644 --- a/app/code/Magento/Wishlist/view/base/templates/product/price/bundle/configured_price.phtml +++ b/app/code/Magento/Wishlist/view/base/templates/product/price/bundle/configured_price.phtml @@ -3,9 +3,13 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ -?> -getZone() == 'item_view'); $idSuffix = $block->getIdSuffix() ?: ''; ?> @@ -15,8 +19,8 @@ $idSuffix = $block->getIdSuffix() ?: ''; renderAmount( $block->getConfiguredPrice()->getAmount(), [ - 'display_label' => $block->escapeHtml(__('Special Price')), - 'price_id' => $block->escapeHtml($block->getPriceId('product-price-' . $idSuffix)), + 'display_label' => $escaper->escapeHtml(__('Special Price')), + 'price_id' => $escaper->escapeHtml($block->getPriceId('product-price-' . $idSuffix)), 'price_type' => 'finalPrice', 'include_container' => true, 'schema' => $schema, @@ -27,8 +31,8 @@ $idSuffix = $block->getIdSuffix() ?: ''; renderAmount( $block->getConfiguredRegularPrice()->getAmount(), [ - 'display_label' => $block->escapeHtml(__('Regular Price')), - 'price_id' => $block->escapeHtml($block->getPriceId('old-price-' . $idSuffix)), + 'display_label' => $escaper->escapeHtml(__('Regular Price')), + 'price_id' => $escaper->escapeHtml($block->getPriceId('old-price-' . $idSuffix)), 'price_type' => 'oldPrice', 'include_container' => true, 'skip_adjustments' => true, @@ -46,8 +50,8 @@ $idSuffix = $block->getIdSuffix() ?: ''; renderAmount( $block->getConfiguredPrice()->getAmount(), [ - 'display_label' => $block->escapeHtml($priceLabel), - 'price_id' => $block->escapeHtml($block->getPriceId('product-price-' . $idSuffix)), + 'display_label' => $escaper->escapeHtml($priceLabel), + 'price_id' => $escaper->escapeHtml($block->getPriceId('product-price-' . $idSuffix)), 'price_type' => 'finalPrice', 'include_container' => true, 'schema' => $schema, diff --git a/app/code/Magento/Wishlist/view/base/templates/product/price/configurable/configured_price.phtml b/app/code/Magento/Wishlist/view/base/templates/product/price/configurable/configured_price.phtml index f9517a106a79a..df3f10bd6a2e8 100644 --- a/app/code/Magento/Wishlist/view/base/templates/product/price/configurable/configured_price.phtml +++ b/app/code/Magento/Wishlist/view/base/templates/product/price/configurable/configured_price.phtml @@ -3,12 +3,18 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ -?> -getZone() == 'item_view'); $idSuffix = $block->getIdSuffix() ?: ''; -/** @var \Magento\Wishlist\Pricing\ConfiguredPrice\ConfigurableProduct $configuredPrice */ + +/** @var ConfigurableProduct $configuredPrice */ $configuredPrice = $block->getPrice(); $configuredRegularAmountValue = $configuredPrice->getConfiguredRegularAmount()->getValue(); ?> @@ -20,8 +26,8 @@ $configuredRegularAmountValue = $configuredPrice->getConfiguredRegularAmount()-> renderAmount( $configuredPrice->getConfiguredAmount(), [ - 'display_label' => $block->escapeHtml(__('Special Price')), - 'price_id' => $block->escapeHtml($block->getPriceId('product-price-' . $idSuffix)), + 'display_label' => $escaper->escapeHtml(__('Special Price')), + 'price_id' => $escaper->escapeHtml($block->getPriceId('product-price-' . $idSuffix)), 'price_type' => 'finalPrice', 'include_container' => true, 'schema' => $schema, @@ -32,8 +38,8 @@ $configuredRegularAmountValue = $configuredPrice->getConfiguredRegularAmount()-> renderAmount( $configuredPrice->getConfiguredRegularAmount(), [ - 'display_label' => $block->escapeHtml(__('Regular Price')), - 'price_id' => $block->escapeHtml($block->getPriceId('old-price-' . $idSuffix)), + 'display_label' => $escaper->escapeHtml(__('Regular Price')), + 'price_id' => $escaper->escapeHtml($block->getPriceId('old-price-' . $idSuffix)), 'price_type' => 'oldPrice', 'include_container' => true, 'skip_adjustments' => true, @@ -51,8 +57,8 @@ $configuredRegularAmountValue = $configuredPrice->getConfiguredRegularAmount()-> renderAmount( $configuredPrice->getAmount(), [ - 'display_label' => $block->escapeHtml($priceLabel), - 'price_id' => $block->escapeHtml($block->getPriceId('product-price-' . $idSuffix)), + 'display_label' => $escaper->escapeHtml($priceLabel), + 'price_id' => $escaper->escapeHtml($block->getPriceId('product-price-' . $idSuffix)), 'price_type' => 'finalPrice', 'include_container' => true, 'schema' => $schema, diff --git a/app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml b/app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml index 0ec1febaf2f7f..4e3a3ef9a9224 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml @@ -3,11 +3,19 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); -/** @var \Magento\Wishlist\Block\Customer\Wishlist\Button $block */ +use Magento\Framework\Escaper; +use Magento\Wishlist\Block\Customer\Wishlist\Button; + +/** @var Escaper $escaper */ +/** @var Button $block */ ?> getWishlist()->getItemsCount() && $block->getWishlist()->getShared() < $block->getConfig()->getSharingEmailLimit()) : ?> - diff --git a/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml b/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml index 30d6c85ab64cd..b150647dc2546 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml @@ -3,12 +3,20 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); -/** @var \Magento\Wishlist\Block\Customer\Wishlist\Button $block */ +use Magento\Framework\Escaper; +use Magento\Wishlist\Block\Customer\Wishlist\Button; + +/** @var Escaper $escaper */ +/** @var Button $block */ ?> getWishlist()->getItemsCount() && $block->getWishlist()->isSalable()) : ?> - diff --git a/app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml b/app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml index 6d8e13eeca5fd..5baf217da5c9b 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml @@ -3,12 +3,19 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); -/** @var \Magento\Wishlist\Block\Customer\Wishlist\Button $block */ -?> +use Magento\Framework\Escaper; +use Magento\Wishlist\Block\Customer\Wishlist\Button; +/** @var Escaper $escaper */ +/** @var Button $block */ +?> getWishlist()->getItemsCount()) : ?> - diff --git a/app/code/Magento/Wishlist/view/frontend/templates/cart/item/renderer/actions/move_to_wishlist.phtml b/app/code/Magento/Wishlist/view/frontend/templates/cart/item/renderer/actions/move_to_wishlist.phtml index 99732791e108b..82807549cc80a 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/cart/item/renderer/actions/move_to_wishlist.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/cart/item/renderer/actions/move_to_wishlist.phtml @@ -3,13 +3,18 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); -/** @var \Magento\Wishlist\Block\Cart\Item\Renderer\Actions\MoveToWishlist $block */ +use Magento\Framework\Escaper; +use Magento\Wishlist\Block\Cart\Item\Renderer\Actions\MoveToWishlist; + +/** @var Escaper $escaper */ +/** @var MoveToWishlist $block */ ?> isAllowInCart() && $block->isProductVisibleInSiteVisibility()) : ?> - escapeHtml(__('Move to Wishlist')) ?> + escapeHtml(__('Move to Wishlist')) ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/catalog/product/list/addto/wishlist.phtml b/app/code/Magento/Wishlist/view/frontend/templates/catalog/product/list/addto/wishlist.phtml index 2427f883c2b53..1e9d0e10e831d 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/catalog/product/list/addto/wishlist.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/catalog/product/list/addto/wishlist.phtml @@ -3,8 +3,13 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); -/** @var Magento\Wishlist\Block\Catalog\Product\ProductList\Item\AddTo\Wishlist $block */ +use Magento\Framework\Escaper; +use Magento\Wishlist\Block\Catalog\Product\ProductList\Item\AddTo\Wishlist; + +/** @var Escaper $escaper */ +/** @var Wishlist $block */ ?> getWishlistHelper()->isAllow()) : ?> isWishListAllowed()) : ?> escapeHtml(__('Add to Wish List')) ?> + data-action="add-to-wishlist">escapeHtml(__('Add to Wish List')) ?>