From 8078623d0874b229c6a6d015cb4ecb644fc41dfd Mon Sep 17 00:00:00 2001 From: Lorenzo Stramaccia Date: Wed, 1 Mar 2017 22:19:21 +0100 Subject: [PATCH 1/2] simplify product lists --- .../frontend/templates/product/list.phtml | 5 +- .../templates/product/list/items.phtml | 7 +- .../frontend/templates/product/listing.phtml | 103 ++++++----- .../widget/new/column/new_default_list.phtml | 91 +++++----- .../product/widget/new/content/new_grid.phtml | 5 +- .../product/widget/new/content/new_list.phtml | 159 ++++++++-------- .../product/widget/content/grid.phtml | 126 +++++++------ .../column/compared_default_list.phtml | 97 +++++----- .../compared/content/compared_grid.phtml | 155 ++++++++-------- .../compared/content/compared_list.phtml | 171 +++++++++--------- .../viewed/column/viewed_default_list.phtml | 95 +++++----- .../viewed/column/viewed_images_list.phtml | 7 +- .../widget/viewed/content/viewed_grid.phtml | 151 ++++++++-------- .../widget/viewed/content/viewed_list.phtml | 167 +++++++++-------- .../view/frontend/templates/item/list.phtml | 15 +- 15 files changed, 669 insertions(+), 685 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 bcbd2882e02c2..0109cdd348dea 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml @@ -42,11 +42,10 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output'); $pos = $block->getPositioned(); ?>
-
    - ' : '
  1. ' ?> +
  2. getImage($_product, $image); @@ -112,7 +111,7 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output');
- ' : '' ?> + 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 84be9271980b4..3d1cb88cac4d8 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 @@ -174,7 +174,6 @@ switch ($type = $block->getType()) {
    - isComposite() && $_item->isSaleable() && $type == 'related'): ?> @@ -183,9 +182,9 @@ switch ($type = $block->getType()) { - ' : '
  1. ' ?> +
  2. ' ?> @@ -252,7 +251,7 @@ switch ($type = $block->getType()) {
- ' : '' ?> + diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml index 2f5bb0211a1ee..27907bf5ebe95 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml @@ -38,61 +38,60 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output'); } ?>
-
    - ' : '
  1. ' ?> -
    - - - getImage($_product, $image)->toHtml(); ?> - -
    - ' - . ' ' - . $_helper->productAttribute($_product, $_product->getName(), 'name') - . ''; - $info['price'] = $block->getProductPrice($_product); - $info['review'] = $block->getReviewsSummaryHtml($_product, $templateType); - - if ($_product->isSaleable()) { - $info['button'] = ''; - } else { - $info['button'] = $_product->getIsSalable() ? '
    ' . __('In stock') . '
    ' : - '
    ' . __('Out of stock') . '
    '; - } - - $info['links'] = ''; - $info['actions'] = '
    ' . $info['button'] . $info['links'] . '
    '; - - if ($showDescription) { - $info['description'] = '
    ' - . $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') - . ' ' - . __('Learn More') . '
    '; - } else { - $info['description'] = ''; - } - - $details = $block->getInfoOrder() ?: ['name','price','review','description','actions']; - foreach ($details as $detail) { - /* @escapeNotVerified */ echo $info[$detail]; - } - ?> - +
  2. +
    + + + getImage($_product, $image)->toHtml(); ?> + +
    + ' + . ' ' + . $_helper->productAttribute($_product, $_product->getName(), 'name') + . ''; + $info['price'] = $block->getProductPrice($_product); + $info['review'] = $block->getReviewsSummaryHtml($_product, $templateType); + + if ($_product->isSaleable()) { + $info['button'] = ''; + } else { + $info['button'] = $_product->getIsSalable() ? '
    ' . __('In stock') . '
    ' : + '
    ' . __('Out of stock') . '
    '; + } + + $info['links'] = ''; + $info['actions'] = '
    ' . $info['button'] . $info['links'] . '
    '; + + if ($showDescription) { + $info['description'] = '
    ' + . $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') + . ' ' + . __('Learn More') . '
    '; + } else { + $info['description'] = ''; + } + + $details = $block->getInfoOrder() ?: ['name','price','review','description','actions']; + foreach ($details as $detail) { + /* @escapeNotVerified */ echo $info[$detail]; + } + ?> + +
    -
- ' : '' ?> + diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml index e2f3c1888c30e..b5f7d2e1559f0 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml @@ -14,59 +14,58 @@
getNameInLayout(); ?> -
    getItems() as $_product): ?> - ' : '
  1. ' ?> -
    - - getImage($_product, 'side_column_widget_product_thumbnail')->toHtml(); ?> - -
    - - - helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> - - - getProductPriceHtml($_product, '-widget-new-' . $suffix) ?> -
    -
    - isSaleable()): ?> - getTypeInstance()->hasRequiredOptions($_product)): ?> - +
  2. +
    + + getImage($_product, 'side_column_widget_product_thumbnail')->toHtml(); ?> + +
    + + + helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> + + + getProductPriceHtml($_product, '-widget-new-' . $suffix) ?> +
    +
    + isSaleable()): ?> + getTypeInstance()->hasRequiredOptions($_product)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]); + ?> + + - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]); - ?> - + getIsSalable()): ?> +
    + +
    + +
    + +
    + - - getIsSalable()): ?> -
    - -
    - -
    - -
    - - +
    -
- getItems())+1) ? '' : '' ?> + getPagerHtml() ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml index 897d70c23acc2..342613f5efcb4 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml @@ -39,9 +39,8 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()-> ' ?>
    - - ' : '
  1. ' ?> +
- ' : '' ?> + diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml index 567ccb2d11581..125e92683be9f 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml @@ -40,91 +40,90 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()-> ' ?>
    - - ' : '
  1. ' ?> -
    - - getImage($_item, $image)->toHtml(); ?> - -
    - - - escapeHtml($_item->getName()) ?> - - - getProductPriceHtml($_item, $type); ?> - - - getReviewsSummaryHtml($_item, $templateType) ?> - - - -
    - -
    - isSaleable()): ?> - getTypeInstance()->hasRequiredOptions($_item)): ?> - +
  2. +
    + + getImage($_item, $image)->toHtml(); ?> + +
    + + + escapeHtml($_item->getName()) ?> + + + getProductPriceHtml($_item, $type); ?> + + + getReviewsSummaryHtml($_item, $templateType) ?> + + + +
    + +
    + isSaleable()): ?> + getTypeInstance()->hasRequiredOptions($_item)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) + ?> + + - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) - ?> - + getIsSalable()): ?> +
    + +
    + - - getIsSalable()): ?> -
    - -
    +
    + + +
    + helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> + + + - -
    - - -
    - helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> - - - - - getAddToCompareUrl() && $showCompare): ?> - helper('Magento\Catalog\Helper\Product\Compare'); ?> - - - - -
    - -
    - - -
    - productAttribute($_item, $_item->getShortDescription(), 'short_description') ?> - -
    - + getAddToCompareUrl() && $showCompare): ?> + helper('Magento\Catalog\Helper\Product\Compare'); ?> + + + + +
    + +
    + + +
    + productAttribute($_item, $_item->getShortDescription(), 'short_description') ?> + +
    + +
- - ' : '' ?> + diff --git a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml index 51943355e8ea7..9976d6fa6bdd6 100644 --- a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml +++ b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml @@ -33,78 +33,76 @@ ' ?>
    - -
  1. -
    - - getImage($_item, $image)->toHtml(); ?> - -
    - - - escapeHtml($_item->getName()) ?> - - - getProductPriceHtml($_item, $type); - ?> +
    + + getImage($_item, $image)->toHtml(); ?> + +
    + + + escapeHtml($_item->getName()) ?> + + + getProductPriceHtml($_item, $type); + ?> - - getReviewsSummaryHtml($_item, $templateType) ?> - + + getReviewsSummaryHtml($_item, $templateType) ?> + - -
    - -
    - isSaleable()): ?> - getTypeInstance()->hasRequiredOptions($_item)): ?> - + +
    + +
    + isSaleable()): ?> + getTypeInstance()->hasRequiredOptions($_item)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) + ?> + + - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) - ?> - + getIsSalable()): ?> +
    escapeHtml(__('In stock')) ?>
    + +
    escapeHtml(__('Out of stock')) ?>
    + - - getIsSalable()): ?> -
    escapeHtml(__('In stock')) ?>
    - -
    escapeHtml(__('Out of stock')) ?>
    +
    + + +
    + helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> + + escapeHtml(__('Add to Wish List')) ?> + + + getAddToCompareUrl() && $showCompare): ?> + helper('Magento\Catalog\Helper\Product\Compare');?> + + escapeHtml(__('Add to Compare')) ?> + - -
    - - -
    - helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> - - escapeHtml(__('Add to Wish List')) ?> - - - getAddToCompareUrl() && $showCompare): ?> - helper('Magento\Catalog\Helper\Product\Compare');?> - - escapeHtml(__('Add to Compare')) ?> - - -
    - -
    - +
    + +
    + +
    -
    - ' : '' ?> +
diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml index f26c96a9f9e2f..b6a76e945d0a2 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml @@ -33,61 +33,60 @@ if ($exist = $block->getRecentlyComparedProducts()) {
getNameInLayout(); ?>
    - - ' : '
  1. ' ?> -
    - - getImage($_product, $image)->toHtml(); ?> - -
    - - - helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> - - - getProductPriceHtml( - $_product, - \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, - \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, - [ - 'price_id_suffix' => '-widget-compared-' . $suffix - ] - ) ?> -
    - isSaleable()): ?> -
    - getTypeInstance()->hasRequiredOptions($_product)): ?> - +
  2. +
    + + getImage($_product, $image)->toHtml(); ?> + +
    + + + helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> + + + getProductPriceHtml( + $_product, + \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, + \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, + [ + 'price_id_suffix' => '-widget-compared-' . $suffix + ] + ) ?> +
    + isSaleable()): ?> +
    + getTypeInstance()->hasRequiredOptions($_product)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]) + ?> + + +
    - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]) - ?> - + getIsSalable()): ?> +
    + +
    +
    - - getIsSalable()): ?> -
    - -
    - -
    -
- ' : '' ?> + diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml index 151e5d6044515..8d0a87fe615ab 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml @@ -37,89 +37,88 @@ if ($exist = $block->getRecentlyComparedProducts()) { ' ?>
    - - ' : '
  1. ' ?> -
    - - getImage($_item, $image)->toHtml(); ?> - -
    - - - escapeHtml($_item->getName()) ?> - - - getProductPriceHtml( - $_item, - \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, - \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, - [ - 'price_id_suffix' => '-' . $type - ] - ) ?> - - getReviewsSummaryHtml($_item, $rating) ?> - - -
    - -
    - isSaleable()): ?> - getTypeInstance()->hasRequiredOptions($_item)): ?> - +
  2. +
    + + getImage($_item, $image)->toHtml(); ?> + +
    + + + escapeHtml($_item->getName()) ?> + + + getProductPriceHtml( + $_item, + \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, + \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, + [ + 'price_id_suffix' => '-' . $type + ] + ) ?> + + getReviewsSummaryHtml($_item, $rating) ?> + + +
    + +
    + isSaleable()): ?> + getTypeInstance()->hasRequiredOptions($_item)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) + ?> + + - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) - ?> - + getIsSalable()): ?> +
    + +
    + - - getIsSalable()): ?> -
    - -
    +
    + + + +
    + helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> + + + - -
    - - - -
    - helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> - - - - - getAddToCompareUrl() && $showCompare): ?> - helper('Magento\Catalog\Helper\Product\Compare'); ?> - - - - -
    - -
    - + getAddToCompareUrl() && $showCompare): ?> + helper('Magento\Catalog\Helper\Product\Compare'); ?> + + + + +
    + +
    + +
- - ' : '' ?> + diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml index 9b6dbc9cbac2c..0ddfc9d936a78 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml @@ -38,97 +38,96 @@ if ($exist = $block->getRecentlyComparedProducts()) { ' ?>
    - - ' : '
  1. ' ?> -
    - - getImage($_item, $image)->toHtml(); ?> - -
    - - - escapeHtml($_item->getName()) ?> - - - getProductPriceHtml( - $_item, - \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, - \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, - [ - 'price_id_suffix' => '-' . $type - ] - ) ?> - - getReviewsSummaryHtml($_item, $rating) ?> - - -
    - -
    - isSaleable()): ?> - getTypeInstance()->hasRequiredOptions($_item)): ?> - +
  2. +
    + + getImage($_item, $image)->toHtml(); ?> + +
    + + + escapeHtml($_item->getName()) ?> + + + getProductPriceHtml( + $_item, + \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, + \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, + [ + 'price_id_suffix' => '-' . $type + ] + ) ?> + + getReviewsSummaryHtml($_item, $rating) ?> + + +
    + +
    + isSaleable()): ?> + getTypeInstance()->hasRequiredOptions($_item)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) + ?> + + - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) - ?> - + getIsSalable()): ?> +
    + +
    + - - getIsSalable()): ?> -
    - -
    +
    + + + +
    + helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> + + + - -
    - - - -
    - helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> - - - - - getAddToCompareUrl() && $showCompare): ?> - helper('Magento\Catalog\Helper\Product\Compare');?> - - - - -
    - -
    - - -
    - productAttribute($_item, $_item->getShortDescription(), 'short_description') ?> - -
    - + getAddToCompareUrl() && $showCompare): ?> + helper('Magento\Catalog\Helper\Product\Compare');?> + + + + +
    + +
    + + +
    + productAttribute($_item, $_item->getShortDescription(), 'short_description') ?> + +
    + +
- - ' : '' ?> + diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml index 0c4b84737a08c..3b84087284881 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml @@ -38,60 +38,59 @@ if ($exist = ($block->getRecentlyViewedProducts() && $block->getRecentlyViewedPr
getNameInLayout(); ?>
    - - ' : '
  1. ' ?> -
    - - getImage($_product, $image)->toHtml(); ?> - -
    - - - helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> - - - getProductPriceHtml( - $_product, - \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, - \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, - [ - 'price_id_suffix' => '-widget-viewed-' . $suffix - ] - ) ?> -
    - isSaleable()): ?> -
    - getTypeInstance()->hasRequiredOptions($_product)): ?> - +
  2. +
    + + getImage($_product, $image)->toHtml(); ?> + +
    + + + helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> + + + getProductPriceHtml( + $_product, + \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, + \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, + [ + 'price_id_suffix' => '-widget-viewed-' . $suffix + ] + ) ?> +
    + isSaleable()): ?> +
    + getTypeInstance()->hasRequiredOptions($_product)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]); + ?> + + +
    - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]); - ?> - + getIsSalable()): ?> +
    + +
    +
    - - getIsSalable()): ?> -
    - -
    - -
    -
- ' : '' ?> + diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml index 3a548aaedb8ad..e5b3b735edb10 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml @@ -35,14 +35,13 @@ if ($exist = ($block->getRecentlyViewedProducts() && $block->getRecentlyViewedPr
getNameInLayout(); ?>
    - - ' : '
  1. ' ?> +
  2. getImage($_product, $image)->toHtml(); ?> - ' : '' ?> - +
  3. +
diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml index e9fe8c8c3aea9..d2c694179eb0f 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml @@ -39,87 +39,86 @@ if ($exist = ($block->getRecentlyViewedProducts() && $block->getRecentlyViewedPr ' ?>
    - - ' : '
  1. ' ?> -
    - - getImage($_item, $image)->toHtml(); ?> - -
    - - - escapeHtml($_item->getName()) ?> - - - getProductPriceHtml( - $_item, - \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, - \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, - [ - 'price_id_suffix' => '-' . $type - ] - ) ?> - - getReviewsSummaryHtml($_item, $rating) ?> - - -
    - -
    - isSaleable()): ?> - getTypeInstance()->hasRequiredOptions($_item)): ?> - +
  2. +
    + + getImage($_item, $image)->toHtml(); ?> + +
    + + + escapeHtml($_item->getName()) ?> + + + getProductPriceHtml( + $_item, + \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, + \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, + [ + 'price_id_suffix' => '-' . $type + ] + ) ?> + + getReviewsSummaryHtml($_item, $rating) ?> + + +
    + +
    + isSaleable()): ?> + getTypeInstance()->hasRequiredOptions($_item)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) + ?> + + - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) - ?> - + getIsSalable()): ?> +
    + +
    + - - getIsSalable()): ?> -
    - -
    +
    + + +
    + helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> + + + + + getAddToCompareUrl() && $showCompare): ?> + helper('Magento\Catalog\Helper\Product\Compare');?> + + + - -
    - - -
    - helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> - - - - - getAddToCompareUrl() && $showCompare): ?> - helper('Magento\Catalog\Helper\Product\Compare');?> - - - - -
    - -
    - +
    + +
    + +
- - ' : '' ?> + diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml index b2077b441b79f..2a2700886a9d9 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml @@ -41,96 +41,95 @@ if ($exist = ($block->getRecentlyViewedProducts() && $block->getRecentlyViewedPr ' ?>
    - - ' : '
  1. ' ?> -
    - - getImage($_item, $image)->toHtml(); ?> - -
    - - - escapeHtml($_item->getName()) ?> - - - getProductPriceHtml( - $_item, - \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, - \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, - [ - 'price_id_suffix' => '-' . $type - ] - ) ?> - - getReviewsSummaryHtml($_item, $rating) ?> - - -
    - -
    - isSaleable()): ?> - getTypeInstance()->hasRequiredOptions($_item)): ?> - +
  2. +
    + + getImage($_item, $image)->toHtml(); ?> + +
    + + + escapeHtml($_item->getName()) ?> + + + getProductPriceHtml( + $_item, + \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, + \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, + [ + 'price_id_suffix' => '-' . $type + ] + ) ?> + + getReviewsSummaryHtml($_item, $rating) ?> + + +
    + +
    + isSaleable()): ?> + getTypeInstance()->hasRequiredOptions($_item)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]); + ?> + + - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]); - ?> - + getIsSalable()): ?> +
    + +
    - - getIsSalable()): ?> -
    - -
    - -
    - +
    + - -
    - helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> - - - - - getAddToCompareUrl() && $showCompare): ?> - helper('Magento\Catalog\Helper\Product\Compare');?> - - - - -
    - -
    - - -
    - productAttribute($_item, $_item->getShortDescription(), 'short_description') ?> - -
    - + +
    + helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> + + + + + getAddToCompareUrl() && $showCompare): ?> + helper('Magento\Catalog\Helper\Product\Compare');?> + + + + +
    + +
    + + +
    + productAttribute($_item, $_item->getShortDescription(), 'short_description') ?> + +
    + +
- - ' : '' ?> + diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml index dce3241ea5f92..38cda03093018 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml @@ -13,17 +13,16 @@ $columns = $block->getColumns(); ?>
- getItems())): ?>
    getItems() as $item): ?> - escapeHtmlAttr($item->getId()) . '">' : '
  1. ' ?> -
    - - setItem($item); echo $column->toHtml($item);?> - -
    - getItems())+1) ? '
  2. ' : '' ?> +
  3. +
    + + setItem($item); echo $column->toHtml($item);?> + +
    +
From 8e22bacb8e5ff15634a93fc4e1336616156988bf Mon Sep 17 00:00:00 2001 From: Oleksii Korshenko Date: Thu, 13 Jul 2017 17:52:47 -0500 Subject: [PATCH 2/2] Updated php tags format --- .../frontend/templates/product/list.phtml | 54 ++++++++-------- .../templates/product/list/items.phtml | 52 ++++++++-------- .../frontend/templates/product/listing.phtml | 16 ++--- .../widget/new/column/new_default_list.phtml | 40 ++++++------ .../product/widget/new/content/new_grid.phtml | 52 ++++++++-------- .../product/widget/new/content/new_list.phtml | 62 +++++++++---------- .../product/widget/content/grid.phtml | 44 ++++++------- .../column/compared_default_list.phtml | 34 +++++----- .../compared/content/compared_grid.phtml | 52 ++++++++-------- .../compared/content/compared_list.phtml | 60 +++++++++--------- .../viewed/column/viewed_default_list.phtml | 32 +++++----- .../viewed/column/viewed_images_list.phtml | 8 +-- .../widget/viewed/content/viewed_grid.phtml | 52 ++++++++-------- .../widget/viewed/content/viewed_list.phtml | 60 +++++++++--------- .../view/frontend/templates/item/list.phtml | 6 +- 15 files changed, 312 insertions(+), 312 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 0109cdd348dea..b48c138e5450b 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml @@ -20,10 +20,10 @@ $_productCollection = $block->getLoadedProductCollection(); $_helper = $this->helper('Magento\Catalog\Helper\Output'); ?> count()): ?> -
+
- getToolbarHtml() ?> - getAdditionalHtml() ?> + getToolbarHtml() ?> + getAdditionalHtml() ?> getMode() == 'grid') { $viewMode = 'grid'; @@ -41,7 +41,7 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output'); */ $pos = $block->getPositioned(); ?> -
+
    @@ -55,8 +55,8 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output'); } ?> - - toHtml(); ?> + + toHtml() ?>
    helper('Magento\Catalog\Helper\Output'); ?> - productAttribute($_product, $_product->getName(), 'name'); ?> + href="getProductUrl() ?>"> + productAttribute($_product, $_product->getName(), 'name') ?> - getReviewsSummaryHtml($_product, $templateType); ?> - getProductPrice($_product) ?> - getProductDetailsHtml($_product); ?> + getReviewsSummaryHtml($_product, $templateType) ?> + getProductPrice($_product) ?> + getProductDetailsHtml($_product) ?>
    -
    > -
    > +
    > +
    > isSaleable()): ?> getAddToCartPostParams($_product); ?> -
    - - - getBlockHtml('formkey')?> + + + + getBlockHtml('formkey') ?>
    isAvailable()): ?> -
    +
    -
    +
    -
    > +
    > getChildBlock('addto')): ?> - setProduct($_product)->getChildHtml(); ?> + setProduct($_product)->getChildHtml() ?>
    - productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> - + productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> +
    @@ -115,7 +115,7 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output');
- getToolbarHtml() ?> + getToolbarHtml() ?> isRedirectToCartEnabled()) : ?>