diff --git a/Magento_CatalogWidget/templates/product/widget/content/grid.phtml b/Magento_CatalogWidget/templates/product/widget/content/grid.phtml new file mode 100644 index 0000000..403ccba --- /dev/null +++ b/Magento_CatalogWidget/templates/product/widget/content/grid.phtml @@ -0,0 +1,125 @@ + +getProductCollection() && $block->getProductCollection()->getSize())): ?> + getProductCollection()->getItems(); + + $showWishlist = true; + $showCompare = true; + $showCart = true; + $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW; + $description = false; + ?> +
+ getBlockHtml('formkey')): ?> + + + diff --git a/Magento_Review/templates/helper/summary_short.phtml b/Magento_Review/templates/helper/summary_short.phtml new file mode 100644 index 0000000..6cd3e5f --- /dev/null +++ b/Magento_Review/templates/helper/summary_short.phtml @@ -0,0 +1,64 @@ +getReviewsUrl() . '#reviews'; +$urlForm = $block->getReviewsUrl() . '#review-form'; + +$displayIfEmpty = $block->getDisplayIfEmpty(); +$listPage = in_array($block->getRequest()->getFullActionName(), ['cms_index_index', 'catalogsearch_result_index', 'catalog_category_view']); + +if ($listPage) { + $displayIfEmpty = true; +} +//if ($block->getRequest()->getActionName()) + +?> +isReviewEnabled() && $block->getReviewsCount()): ?> + getRatingSummary(); ?> + +isReviewEnabled() && $displayIfEmpty): ?> + + + diff --git a/web/css/source/_extend.less b/web/css/source/_extend.less index f489547..ceab39c 100644 --- a/web/css/source/_extend.less +++ b/web/css/source/_extend.less @@ -366,7 +366,7 @@ input:-webkit-autofill:active { .product-item-actions { flex-grow: 1; //margin-top: auto; - margin-top: 15px; + margin-top: 5px; margin-bottom: 0; } .product-item-description { @@ -412,6 +412,10 @@ input:-webkit-autofill:active { box-sizing: border-box; .product-item-name { margin: 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + .product-item-link {} } .price-box { margin: 0 0 5px 0; @@ -434,11 +438,25 @@ input:-webkit-autofill:active { } // Summary -.product-reviews-summary { - margin-bottom: 10px; - .reviews-actions { - a { - color: @theme__color__secondary; +& when (@media-common = true) { + .product-reviews-summary { + + &.short.empty { + .rating-summary { + .rating-result { + position: relative; + height: 28px; + &:before { + opacity: 0.5; + } + } + } + } + + .reviews-actions { + a { + color: @theme__color__secondary; + } } } } +