13 if ($exist =
$block->getRecentlyComparedProducts()) {
14 $type =
'widget-compared';
19 $image =
'recently_compared_products_list_content_widget';
22 $_helper = $this->helper(
'Magento\Catalog\Helper\Output');
33 <div
class=
"block widget block-compared-products-<?= /* @escapeNotVerified */ $mode ?>">
34 <div
class=
"block-title">
35 <strong role=
"heading" aria-level=
"2"><?=
$title ?></strong>
37 <div
class=
"block-content">
38 <?=
'<!-- ' .
$image .
'-->' ?>
39 <div
class=
"products-<?= /* @escapeNotVerified */ $mode ?> <?= /* @escapeNotVerified */ $mode ?>">
40 <ol
class=
"product-items <?= /* @escapeNotVerified */ $type ?>">
42 <li
class=
"product-item">
43 <div
class=
"product-item-info">
44 <a href=
"<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>" class=
"product-item-photo">
47 <div
class=
"product-item-details">
48 <strong
class=
"product-item-name">
49 <a title=
"<?= $block->escapeHtml($_item->getName()) ?>" 50 href=
"<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>" class=
"product-item-link">
54 <?php echo
$block->getProductPriceHtml(
56 \
Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE,
57 \
Magento\Framework\Pricing\Render::ZONE_ITEM_LIST,
59 'price_id_suffix' =>
'-' .
$type 66 <div
class=
"product-item-actions">
68 <div
class=
"actions-primary">
69 <?php
if (
$_item->isSaleable()): ?>
70 <?php
if (
$_item->getTypeInstance()->hasRequiredOptions(
$_item)): ?>
71 <button
class=
"action tocart primary" 72 data-
mage-init=
'{"redirectUrl": {"url": "<?= /* @escapeNotVerified */ $block->getAddToCartUrl($_item) ?>"}}' 73 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
74 <span><?=
__(
'Add to Cart') ?></span>
78 $postDataHelper = $this->helper(
'Magento\Framework\Data\Helper\PostHelper');
81 <button
class=
"action tocart primary" 82 data-post=
'<?= /* @escapeNotVerified */ $postData ?>' 83 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
84 <span><?=
__(
'Add to Cart') ?></span>
88 <?php
if (
$_item->getIsSalable()): ?>
89 <div
class=
"stock available"><span><?=
__(
'In stock') ?></span></div>
91 <div
class=
"stock unavailable"><span><?=
__(
'Out of stock') ?></span></div>
98 <div
class=
"actions-secondary" data-role=
"add-to-links">
99 <?php
if ($this->helper(
'Magento\Wishlist\Helper\Data')->isAllow() &&
$showWishlist): ?>
101 data-post=
'<?= /* @escapeNotVerified */ $block->getAddToWishlistParams($_item) ?>' 102 data-action=
"add-to-wishlist" 103 class=
"action towishlist" 104 title=
"<?= /* @escapeNotVerified */ __('Add to Wish List') ?>">
105 <span><?=
__(
'Add to Wish List') ?></span>
109 <?php
$compareHelper = $this->helper(
'Magento\Catalog\Helper\Product\Compare');?>
110 <a href=
"#" class=
"action tocompare" 111 data-post=
'<?= /* @escapeNotVerified */ $compareHelper->getPostDataParams($_item) ?>' 112 title=
"<?= /* @escapeNotVerified */ __('Add to Compare') ?>">
113 <span><?=
__(
'Add to Compare') ?></span>
121 <div
class=
"product-item-description">
123 <a title=
"<?= $block->escapeHtml($_item->getName()) ?>" 124 href=
"<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>" 125 class=
"action more"><?=
__(
'Learn More') ?></a>
134 <?=
$block->getPagerHtml() ?>
if( $form)() ?>< script > require(['jquery' mage mage
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode