11 if ($exist =
$block->getRecentlyComparedProducts()) {
12 $type =
'widget-compared';
17 $image =
'recently_compared_products_images_names_widget';
29 <div
class=
"block widget block-compared-products-<?= /* @escapeNotVerified */ $mode ?>">
30 <div
class=
"block-title">
31 <strong><?=
$title ?></strong>
33 <div
class=
"block-content">
35 <ol
class=
"product-items" id=
"widget-compared-<?= /* @escapeNotVerified */ $suffix ?>">
37 <li
class=
"product-item">
38 <div
class=
"product-item-info">
39 <a
class=
"product-item-photo" href=
"<?= /* @escapeNotVerified */ $_product->getProductUrl() ?>" 40 title=
"<?= /* @escapeNotVerified */ $block->stripTags($_product->getName(), null, true) ?>">
43 <div
class=
"product-item-details">
44 <strong
class=
"product-item-name">
45 <a href=
"<?= /* @escapeNotVerified */ $_product->getProductUrl() ?>" 46 title=
"<?= /* @escapeNotVerified */ $block->stripTags($_product->getName(), null, true) ?>)">
47 <?= $this->helper(
'Magento\Catalog\Helper\Output')->productAttribute(
$_product,
$_product->getName(),
'name') ?>
50 <?php echo
$block->getProductPriceHtml(
52 \
Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE,
53 \
Magento\Framework\Pricing\Render::ZONE_ITEM_LIST,
55 'price_id_suffix' =>
'-widget-compared-' .
$suffix 58 <div
class=
"product-item-actions">
60 <div
class=
"actions-primary">
62 <button
class=
"action tocart primary" 63 data-
mage-init=
'{"redirectUrl": {"url": "<?= /* @escapeNotVerified */ $block->getAddToCartUrl($_product) ?>"}}' 64 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
65 <span><?=
__(
'Add to Cart') ?></span>
69 $postDataHelper = $this->helper(
'Magento\Framework\Data\Helper\PostHelper');
72 <button
class=
"action tocart primary" 73 data-post=
'<?= /* @escapeNotVerified */ $postData ?>' 74 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
75 <span><?=
__(
'Add to Cart') ?></span>
81 <div
class=
"stock available"><span><?=
__(
'In stock') ?></span></div>
83 <div
class=
"stock unavailable"><span><?=
__(
'Out of stock') ?></span></div>
if( $form)() ?>< script > require(['jquery' mage mage
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode