From 08671ba3d1a80c805742219a01d2134787ac144b Mon Sep 17 00:00:00 2001 From: Ivan Gerchak Date: Mon, 27 Jul 2020 12:46:17 +0300 Subject: [PATCH 1/3] Add back extension point for adding some html to the category page #29286 --- .../frontend/templates/product/list.phtml | 4 +- .../templates/product/listing/renderer.phtml | 65 ++++++++++--------- 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml index 554caf6026001..7803293e0d4b4 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml @@ -74,9 +74,7 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class); getReviewsSummaryHtml($_product, $templateType) ?> getProductPrice($_product) ?> - isAvailable()) :?> - getProductDetailsHtml($_product) ?> - + getProductDetailsHtml($_product) ?>
escapeHtmlAttr($position) : '' ?>> diff --git a/app/code/Magento/Swatches/view/frontend/templates/product/listing/renderer.phtml b/app/code/Magento/Swatches/view/frontend/templates/product/listing/renderer.phtml index 5838ba9625c6a..3829f830c435e 100644 --- a/app/code/Magento/Swatches/view/frontend/templates/product/listing/renderer.phtml +++ b/app/code/Magento/Swatches/view/frontend/templates/product/listing/renderer.phtml @@ -4,42 +4,43 @@ * See COPYING.txt for license details. */ ?> -getProduct()->getId(); -/** @var \Magento\Swatches\ViewModel\Product\Renderer\Configurable $configurableViewModel */ -$configurableViewModel = $block->getConfigurableViewModel() -?> -
+ +getProduct() ?> +isAvailable()) : ?> + getId() ?> + + getConfigurableViewModel() ?> +
- + - + + From aeccbe5ec1d4c5cee1ab7ee291efd9b25253ea8a Mon Sep 17 00:00:00 2001 From: Ivan Gerchak Date: Mon, 27 Jul 2020 12:57:45 +0300 Subject: [PATCH 2/3] Add back extension point for adding some html to the category page #29286 --- .../frontend/templates/product/list.phtml | 55 ++++++++++++------- .../templates/product/listing/renderer.phtml | 14 +++-- 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml index 7803293e0d4b4..f4cd50b45d246 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml @@ -8,6 +8,8 @@ use Magento\Framework\App\Action\Action; ?> getLoadedProductCollection(); /** @var \Magento\Catalog\Helper\Output $_helper */ $_helper = $this->helper(Magento\Catalog\Helper\Output::class); ?> -count()) :?> -
escapeHtml(__('We can\'t find products matching the selection.')) ?>
- +count()): ?> +
+
escapeHtml(__('We can\'t find products matching the selection.')) ?>
+
+ getToolbarHtml() ?> getAdditionalHtml() ?> getMode() == 'grid') { + if ($block->getMode() === 'grid') { $viewMode = 'grid'; $imageDisplayArea = 'category_page_grid'; $showDescription = false; @@ -46,7 +50,7 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class);
    - +
  1. helper(Magento\Catalog\Helper\Output::class); toHtml() ?>
    - stripTags($_product->getName(), null, true); - ?> + stripTags($_product->getName(), null, true); ?> - productAttribute($_product, $_product->getName(), 'name') ?> + productAttribute( + $_product, + $_product->getName(), + 'name' + ) ?> getReviewsSummaryHtml($_product, $templateType) ?> @@ -79,7 +85,7 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class);
    escapeHtmlAttr($position) : '' ?>>
    escapeHtmlAttr($position) : '' ?>> - isSaleable()) :?> + isSaleable()): ?> getAddToCartPostParams($_product); ?>
    helper(Magento\Catalog\Helper\Output::class); - getBlockHtml('formkey') ?>
    - - isAvailable()) :?> -
    escapeHtml(__('In stock')) ?>
    - -
    escapeHtml(__('Out of stock')) ?>
    + + isAvailable()): ?> +
    + escapeHtml(__('In stock')) ?> +
    + +
    + escapeHtml(__('Out of stock')) ?> +
    escapeHtmlAttr($position) : '' ?>> - getChildBlock('addto')) :?> + getChildBlock('addto')): ?> setProduct($_product)->getChildHtml() ?>
    - +
    - productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> + productAttribute( + $_product, + $_product->getShortDescription(), + 'short_description' + ) ?> escapeHtml(__('Learn More')) ?> @@ -127,7 +142,7 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class);
getToolbarHtml() ?> - isRedirectToCartEnabled()) :?> + isRedirectToCartEnabled()): ?>