Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-catalog
view
frontend
templates
product
compare
sidebar.phtml
Go to the documentation of this file.
1
<?php
7
// @codingStandardsIgnoreFile
8
/* @var $block \Magento\Framework\View\Element\Template */
9
?>
10
<div
class
=
"block block-compare"
data-bind=
"scope: 'compareProducts'"
data-role=
"compare-products-sidebar"
>
11
<div
class
=
"block-title"
>
12
<strong
id
=
"block-compare-heading"
role=
"heading"
aria-level=
"2"
><?=
/* @escapeNotVerified */
__
(
'Compare Products'
) ?></strong>
13
<span
class
=
"counter qty no-display"
data-bind=
"text: compareProducts().countCaption, css: {'no-display': !compareProducts().count}"
></span>
14
</div>
15
<!-- ko
if
: compareProducts().count -->
16
<div
class
=
"block-content no-display"
aria-labelledby=
"block-compare-heading"
data-bind=
"css: {'no-display': !compareProducts().count}"
>
17
<ol
id
=
"compare-items"
class
=
"product-items product-items-names"
data-bind=
"foreach: compareProducts().items"
>
18
<li
class
=
"product-item"
>
19
<input type=
"hidden"
class
=
"compare-item-id"
data-bind=
"value: id"
/>
20
<strong
class
=
"product-item-name"
>
21
<a data-bind=
"attr: {href: product_url}, html: name"
class
=
"product-item-link"
></a>
22
</strong>
23
<a href=
"#"
data-bind=
"attr: {'data-post': remove_url}"
title=
"<?= /* @escapeNotVerified */ __('Remove This Item') ?>"
class
=
"action delete"
>
24
<span><?=
/* @escapeNotVerified */
__
(
'Remove This Item'
) ?></span>
25
</a>
26
</li>
27
</ol>
28
<div
class
=
"actions-toolbar"
>
29
<div
class
=
"primary"
>
30
<a data-bind=
"attr: {'href': compareProducts().listUrl}"
class
=
"action compare primary"
><span><?=
/* @escapeNotVerified */
__
(
'Compare'
) ?></span></a>
31
</div>
32
<div
class
=
"secondary"
>
33
<a
id
=
"compare-clear-all"
href=
"#"
class
=
"action clear"
data-post=
"<?=$block->escapeHtml(
34
$this->helper('Magento\Catalog\Helper\Product\Compare')->getPostDataClearList()
35
) ?>"
>
36
<span><?=
/* @escapeNotVerified */
__
(
'Clear All'
) ?></span>
37
</a>
38
</div>
39
</div>
40
</div>
41
<!-- /ko -->
42
<!-- ko ifnot: compareProducts().count -->
43
<div
class
=
"empty"
><?=
/* @escapeNotVerified */
__
(
'You have no items to compare.'
) ?></div>
44
<!-- /ko -->
45
</div>
46
<script type=
"text/x-magento-init"
>
47
{
"[data-role=compare-products-sidebar]"
: {
"Magento_Ui/js/core/app"
: <?=
/* @escapeNotVerified */
$block
->getJsLayout() ?>}}
48
</script>
__
__()
Definition:
__.php:13
$block
$block
Definition:
block.php:8