13 if ($exist =
$block->getRecentlyComparedProducts()) {
14 $type =
'widget-compared';
19 $image =
'recently_compared_products_grid_content_widget';
32 <div
class=
"block widget block-compared-products-<?= /* @escapeNotVerified */ $mode ?>">
33 <div
class=
"block-title">
34 <strong role=
"heading" aria-level=
"2"><?=
$title ?></strong>
36 <div
class=
"block-content">
37 <?=
'<!-- ' .
$image .
'-->' ?>
38 <div
class=
"products-<?= /* @escapeNotVerified */ $mode ?> <?= /* @escapeNotVerified */ $mode ?>">
39 <ol
class=
"product-items <?= /* @escapeNotVerified */ $type ?>">
41 <li
class=
"product-item">
42 <div
class=
"product-item-info">
43 <a href=
"<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>" class=
"product-item-photo">
46 <div
class=
"product-item-details">
47 <strong
class=
"product-item-name">
48 <a title=
"<?= $block->escapeHtml($_item->getName()) ?>" 49 href=
"<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>" class=
"product-item-link">
53 <?php echo
$block->getProductPriceHtml(
55 \
Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE,
56 \
Magento\Framework\Pricing\Render::ZONE_ITEM_LIST,
58 'price_id_suffix' =>
'-' .
$type 65 <div
class=
"product-item-actions">
67 <div
class=
"actions-primary">
68 <?php
if (
$_item->isSaleable()): ?>
69 <?php
if (
$_item->getTypeInstance()->hasRequiredOptions(
$_item)): ?>
70 <button
class=
"action tocart primary" 71 data-
mage-init=
'{"redirectUrl": {"url": "<?= /* @escapeNotVerified */ $block->getAddToCartUrl($_item) ?>"}}' 72 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
73 <span><?=
__(
'Add to Cart') ?></span>
77 $postDataHelper = $this->helper(
'Magento\Framework\Data\Helper\PostHelper');
80 <button
class=
"action tocart primary" 81 data-post=
'<?= /* @escapeNotVerified */ $postData ?>' 82 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
83 <span><?=
__(
'Add to Cart') ?></span>
87 <?php
if (
$_item->getIsSalable()): ?>
88 <div
class=
"stock available"><span><?=
__(
'In stock') ?></span></div>
90 <div
class=
"stock unavailable"><span><?=
__(
'Out of stock') ?></span></div>
97 <div
class=
"actions-secondary" data-role=
"add-to-links">
98 <?php
if ($this->helper(
'Magento\Wishlist\Helper\Data')->isAllow() &&
$showWishlist): ?>
100 data-post=
'<?= /* @escapeNotVerified */ $block->getAddToWishlistParams($_item) ?>' 101 data-action=
"add-to-wishlist" 102 class=
"action towishlist" 103 title=
"<?= /* @escapeNotVerified */ __('Add to Wish List') ?>">
104 <span><?=
__(
'Add to Wish List') ?></span>
108 <?php
$compareHelper = $this->helper(
'Magento\Catalog\Helper\Product\Compare'); ?>
109 <a href=
"#" class=
"action tocompare" 110 data-post=
'<?= /* @escapeNotVerified */ $compareHelper->getPostDataParams($_item) ?>' 111 title=
"<?= /* @escapeNotVerified */ __('Add to Compare') ?>">
112 <span><?=
__(
'Add to Compare') ?></span>
125 <?=
$block->getPagerHtml() ?>
if( $form)() ?>< script > require(['jquery' mage mage
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode