16 if ($exist = (
$block->getRecentlyViewedProducts() &&
$block->getRecentlyViewedProducts()->getSize())) {
17 $type =
'widget-viewed';
22 $image =
'recently_viewed_products_list_content_widget';
25 $_helper = $this->helper(
'Magento\Catalog\Helper\Output');
36 <div
class=
"block widget block-viewed-products-<?= /* @escapeNotVerified */ $mode ?>">
37 <div
class=
"block-title">
38 <strong role=
"heading" aria-level=
"2"><?=
$title ?></strong>
40 <div
class=
"block-content">
41 <?=
'<!-- ' .
$image .
'-->' ?>
42 <div
class=
"products-<?= /* @escapeNotVerified */ $mode ?> <?= /* @escapeNotVerified */ $mode ?>">
43 <ol
class=
"product-items <?= /* @escapeNotVerified */ $type ?>">
45 <li
class=
"product-item">
46 <div
class=
"product-item-info">
47 <a href=
"<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>" class=
"product-item-photo">
50 <div
class=
"product-item-details">
51 <strong
class=
"product-item-name">
52 <a title=
"<?= $block->escapeHtml($_item->getName()) ?>" 53 href=
"<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>" class=
"product-item-link">
57 <?php echo
$block->getProductPriceHtml(
59 \
Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE,
60 \
Magento\Framework\Pricing\Render::ZONE_ITEM_LIST,
62 'price_id_suffix' =>
'-' .
$type 69 <div
class=
"product-item-actions">
71 <div
class=
"actions-primary">
72 <?php
if (
$_item->isSaleable()): ?>
73 <?php
if (
$_item->getTypeInstance()->hasRequiredOptions(
$_item)): ?>
74 <button
class=
"action tocart primary" 75 data-
mage-init=
'{"redirectUrl": {"url": "<?= /* @escapeNotVerified */ $block->getAddToCartUrl($_item) ?>"}}' 76 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
77 <span><?=
__(
'Add to Cart') ?></span>
81 $postDataHelper = $this->helper(
'Magento\Framework\Data\Helper\PostHelper');
84 <button
class=
"action tocart primary" 85 data-post=
'<?= /* @escapeNotVerified */ $postData ?>' 86 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
87 <span><?=
__(
'Add to Cart') ?></span>
91 <?php
if (
$_item->getIsSalable()): ?>
92 <div
class=
"stock available"><span><?=
__(
'In stock') ?></span></div>
94 <div
class=
"stock unavailable"><span><?=
__(
'Out of stock') ?></span></div>
101 <div
class=
"actions-secondary" data-role=
"add-to-links">
102 <?php
if ($this->helper(
'Magento\Wishlist\Helper\Data')->isAllow() &&
$showWishlist): ?>
104 class=
"action towishlist" data-action=
"add-to-wishlist" 105 data-post=
'<?= /* @escapeNotVerified */ $block->getAddToWishlistParams($_item) ?>' 106 title=
"<?= /* @escapeNotVerified */ __('Add to Wish List') ?>">
107 <span><?=
__(
'Add to Wish List') ?></span>
111 <?php
$compareHelper = $this->helper(
'Magento\Catalog\Helper\Product\Compare');?>
112 <a href=
"#" class=
"action tocompare" 113 data-post=
'<?= /* @escapeNotVerified */ $compareHelper->getPostDataParams($_item) ?>' 114 title=
"<?= /* @escapeNotVerified */ __('Add to Compare') ?>">
115 <span><?=
__(
'Add to Compare') ?></span>
123 <div
class=
"product-item-description">
125 <a title=
"<?= $block->escapeHtml($_item->getName()) ?>" 126 href=
"<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>" 127 class=
"action more"><?=
__(
'Learn More') ?></a>
136 <?=
$block->getPagerHtml() ?>
if( $form)() ?>< script > require(['jquery' mage mage
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode