From a61ec82889e5ae63036f374f695790518dec6bc0 Mon Sep 17 00:00:00 2001 From: Igor Wulff Date: Wed, 10 May 2023 12:08:21 +0200 Subject: [PATCH 1/2] Fix issue where upsell and related products were controlling each others visibility On a PDP with both upsell and related products with a limit set and a shared set of some of the products an issue could arise where products being hidden or shown by the related product js would impact the upsell products and vice versa. --- .../Catalog/view/frontend/templates/product/list/items.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml index 6fd619de7fd6c..8e9c74124ae42 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml @@ -200,11 +200,11 @@ $_item = null;
  • renderStyleAsTag( 'display:none;', - 'li#product-item_' . $_item->getId() + 'li#product-item-' . $type . '_' . $_item->getId() ) ?>
  • From 2c85cab5d80d407021e6aedfb89adbebb1535653 Mon Sep 17 00:00:00 2001 From: engcom-Dash Date: Mon, 28 Oct 2024 17:33:55 +0530 Subject: [PATCH 2/2] 37482: Fix failed static tests --- .../templates/product/list/items.phtml | 59 +++++++++++-------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml index 8e9c74124ae42..7840c8454af4c 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml @@ -1,14 +1,17 @@ -
    -
    -
    +
    - escapeHtml($title) ?> + escapeHtml($title) ?>
    -
    +
    - escapeHtml(__('Check items to add to the cart or')) ?> + escapeHtml(__('Check items to add to the cart or')) ?> + data-role="select-all"> + escapeHtml(__('select all')) ?> +
    -
    +
      @@ -201,7 +206,7 @@ $_item = null;
    1. + data-shuffle-group="escapeHtmlAttr($_item->getPriority()) ?>" > renderStyleAsTag( 'display:none;', 'li#product-item-' . $type . '_' . $_item->getId() @@ -211,16 +216,16 @@ $_item = null;
      ' ?> - getImage($_item, $image)->toHtml() ?>
      - escapeHtml($_item->getName()) ?> + title="escapeHtmlAttr($_item->getName()) ?>" + href="escapeUrl($block->getProductUrl($_item)) ?>"> + escapeHtml($_item->getName()) ?> getProductPrice($_item) ?> @@ -236,12 +241,16 @@ $_item = null; + value="escapeHtmlAttr($_item->getId()) ?>" />
      @@ -324,7 +333,7 @@ $_item = null; { "[data-role=tocart-form], .form.map.checkout": { "catalogAddToCart": { - "product_sku": "escapeJs($_item->getSku()) ?>" + "product_sku": "escapeJs($_item->getSku()) ?>" } } }