diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/templates/catalog/product/composite/fieldset/grouped.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/templates/catalog/product/composite/fieldset/grouped.phtml index 7c6fa50070315..c6649e8e92f48 100644 --- a/app/code/Magento/GroupedProduct/view/adminhtml/templates/catalog/product/composite/fieldset/grouped.phtml +++ b/app/code/Magento/GroupedProduct/view/adminhtml/templates/catalog/product/composite/fieldset/grouped.phtml @@ -3,32 +3,38 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + +use Magento\Framework\Escaper; +use Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped; + +/** @var Escaper $escaper */ +/** @var Grouped $block */ + // phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis +$_skipSaleableCheck = $this->helper(Magento\Catalog\Helper\Product::class)->getSkipSaleableCheck(); ?> - - -helper(Magento\Catalog\Helper\Product::class)->getSkipSaleableCheck(); ?>
-

escapeHtml(__('Associated Products')) ?>

+

escapeHtml(__('Associated Products')) ?>

getProduct(); ?> setPreconfiguredValue(); ?> getAssociatedProducts(); ?> 0; ?> isAvailable() && !$_skipSaleableCheck) || !$_hasAssociatedProducts) : ?> -

escapeHtml(__('Availability:')) ?> escapeHtml(__('Out of stock')) ?>

+

escapeHtml(__('Availability:')) ?> escapeHtml(__('Out of stock')) ?>

- - - + + + getCanShowProductPrice($_product)) : ?> - + isSaleable() || $_skipSaleableCheck) : ?> - + @@ -36,10 +42,10 @@ - - - - + + + + getCanShowProductPrice($_product)) : ?> @@ -67,7 +73,7 @@ - + diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/grouped.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/grouped.phtml index ac6161d940a3a..992c3ecb6d6a8 100644 --- a/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/grouped.phtml +++ b/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/grouped.phtml @@ -3,16 +3,19 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); -/** @var $block \Magento\Framework\View\Element\Template */ +use Magento\Framework\Escaper; +use Magento\Framework\View\Element\Template; -/** @var $block \Magento\Framework\View\Element\Template */ +/** @var Escaper $escaper */ +/** @var Template $block */ $_gridPopupBlock = $block->getChildBlock('catalog.product.group.grid.popup.container')->getChildBlock('grid'); $_gridPopupBlock->setRowClickCallback('function(){}'); ?> -
+
- escapeHtml(__('There are no grouped products.')) ?> + escapeHtml(__('There are no grouped products.')) ?>
getChildHtml('list') ?>
diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/list.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/list.phtml index 99b6e44feffee..5f2508e1e12db 100644 --- a/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/list.phtml +++ b/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/list.phtml @@ -3,9 +3,16 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + +use Magento\Framework\Escaper; +use Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts; + +/** @var Escaper $escaper */ +/** @var ListAssociatedProducts $block */ + // phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis // phpcs:disable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound -/* @var $block \Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts */ ?>
escapeHtml(__('ID')) ?>escapeHtml(__('SKU')) ?>escapeHtml(__('Product Name')) ?>escapeHtml(__('ID')) ?>escapeHtml(__('SKU')) ?>escapeHtml(__('Product Name')) ?> escapeHtml(__('Price')) ?>escapeHtml(__('Price')) ?> escapeHtml(__('Qty')) ?>escapeHtml(__('Qty')) ?>
escapeHtml($_item->getId()) ?>escapeHtml($_item->getSku()) ?>escapeHtml($_item->getName()) ?>
escapeHtml($_item->getId()) ?>escapeHtml($_item->getSku()) ?>escapeHtml($_item->getName()) ?> getCanShowProductPrice($_item)) : ?> @@ -51,15 +57,15 @@ isSaleable() || $_skipSaleableCheck) : ?> - + -

escapeHtml(__('Out of stock')) ?>

+

escapeHtml(__('Out of stock')) ?>

escapeHtml(__('No options of this product are available.')) ?>escapeHtml(__('No options of this product are available.')) ?>
escapeHtml( $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getAssociatedProducts()) ); ?>"> @@ -57,16 +64,16 @@
- escapeHtml(__('Name')) ?> + escapeHtml(__('Name')) ?> - escapeHtml(__('SKU')) ?> + escapeHtml(__('SKU')) ?> - escapeHtml(__('Price')) ?> + escapeHtml(__('Price')) ?> - escapeHtml(__('Default Qty')) ?> + escapeHtml(__('Default Qty')) ?> diff --git a/app/code/Magento/GroupedProduct/view/base/templates/product/price/final_price.phtml b/app/code/Magento/GroupedProduct/view/base/templates/product/price/final_price.phtml index c9c03b9f214d9..404b4527d9d0b 100644 --- a/app/code/Magento/GroupedProduct/view/base/templates/product/price/final_price.phtml +++ b/app/code/Magento/GroupedProduct/view/base/templates/product/price/final_price.phtml @@ -3,12 +3,12 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + +use Magento\Framework\Escaper; + +/** @var Escaper $escaper */ -/** - * Template for displaying grouped product price - */ -?> -getSaleableItem() ->getPriceInfo() ->getPrice(\Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE) @@ -27,7 +27,7 @@ if ($minProduct) {
getZone()) : ?>

- escapeHtml(__('Starting at')) ?>toHtml() ?> + escapeHtml(__('Starting at')) ?>toHtml() ?>

diff --git a/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/default.phtml b/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/default.phtml index b1697bfb012b9..82a6326a14bc0 100644 --- a/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/default.phtml +++ b/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/default.phtml @@ -3,20 +3,25 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ -?> - -getProduct() ?> +declare(strict_types=1); + +use Magento\Catalog\Block\Product\View\AbstractView; +use Magento\Framework\Escaper; -getAssociatedProducts(); ?> - 0; ?> +/** @var Escaper $escaper */ +/** @var AbstractView $block */ +$_product = $block->getProduct(); +$_associatedProducts = $block->getAssociatedProducts(); +$_hasAssociatedProducts = count($_associatedProducts) > 0; +?> displayProductStockStatus()) : ?> isAvailable() && $_hasAssociatedProducts) : ?> -
- escapeHtml(__('In stock')) ?> +
+ escapeHtml(__('In stock')) ?>
-
- escapeHtml(__('Out of stock')) ?> +
+ escapeHtml(__('Out of stock')) ?>
diff --git a/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/grouped.phtml b/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/grouped.phtml index 0257d87a2d9ee..709cbdd1bd700 100644 --- a/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/grouped.phtml +++ b/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/grouped.phtml @@ -3,29 +3,28 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); -/** - * Grouped product data template - * - * @var $block \Magento\Catalog\Block\Product\View\BaseImage - * @var $block \Magento\GroupedProduct\Block\Product\View\Type\Grouped - */ -?> -setPreconfiguredValue(); ?> -getProduct(); ?> -getAssociatedProducts(); ?> - 0; ?> +use Magento\Framework\Escaper; +use Magento\GroupedProduct\Block\Product\View\Type\Grouped; +/** @var Escaper $escaper */ +/** @var Grouped $block */ +$block->setPreconfiguredValue(); +$_product = $block->getProduct(); +$_associatedProducts = $block->getAssociatedProducts(); +$_hasAssociatedProducts = count($_associatedProducts) > 0; +?>
- + - + isSaleable()) : ?> - + @@ -34,8 +33,8 @@ - isSaleable()) : ?> - @@ -85,7 +84,7 @@
escapeHtml(__('Grouped product items')) ?>escapeHtml(__('Grouped product items')) ?>
escapeHtml(__('Product Name')) ?>escapeHtml(__('Product Name')) ?> escapeHtml(__('Qty')) ?>escapeHtml(__('Qty')) ?>
- escapeHtml($_item->getName()) ?> + + escapeHtml($_item->getName()) ?> getCanShowProductPrice($_product)) : ?> getCanShowProductPrice($_item)) : ?> getProductPrice($_item) ?> @@ -43,21 +42,21 @@ + isSaleable()) : ?>
-
- escapeHtml(__('Out of stock')) ?> +
+ escapeHtml(__('Out of stock')) ?>
- escapeHtml(__('No options of this product are available.')) ?> + escapeHtml(__('No options of this product are available.')) ?>