16 if ($exist = (
$block->getRecentlyViewedProducts() &&
$block->getRecentlyViewedProducts()->getSize())) {
17 $type =
'widget-viewed';
22 $image =
'recently_viewed_products_grid_content_widget';
34 <div
class=
"block widget block-viewed-products-<?= /* @escapeNotVerified */ $mode ?>">
35 <div
class=
"block-title">
36 <strong role=
"heading" aria-level=
"2"><?=
$title ?></strong>
38 <div
class=
"block-content">
39 <?=
'<!-- ' .
$image .
'-->' ?>
40 <div
class=
"products-<?= /* @escapeNotVerified */ $mode ?> <?= /* @escapeNotVerified */ $mode ?>">
41 <ol
class=
"product-items <?= /* @escapeNotVerified */ $type ?>">
43 <li
class=
"product-item">
44 <div
class=
"product-item-info">
45 <a href=
"<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>" class=
"product-item-photo">
48 <div
class=
"product-item-details">
49 <strong
class=
"product-item-name">
50 <a title=
"<?= $block->escapeHtml($_item->getName()) ?>" 51 href=
"<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>" class=
"product-item-link">
55 <?php echo
$block->getProductPriceHtml(
57 \
Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE,
58 \
Magento\Framework\Pricing\Render::ZONE_ITEM_LIST,
60 'price_id_suffix' =>
'-' .
$type 67 <div
class=
"product-item-actions">
69 <div
class=
"actions-primary">
70 <?php
if (
$_item->isSaleable()): ?>
71 <?php
if (
$_item->getTypeInstance()->hasRequiredOptions(
$_item)): ?>
72 <button
class=
"action tocart primary" 73 data-
mage-init=
'{"redirectUrl": {"url": "<?= /* @escapeNotVerified */ $block->getAddToCartUrl($_item) ?>"}}' 74 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
75 <span><?=
__(
'Add to Cart') ?></span>
79 $postDataHelper = $this->helper(
'Magento\Framework\Data\Helper\PostHelper');
82 <button
class=
"action tocart primary" 83 data-post=
'<?= /* @escapeNotVerified */ $postData ?>' 84 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
85 <span><?=
__(
'Add to Cart') ?></span>
89 <?php
if (
$_item->getIsSalable()): ?>
90 <div
class=
"stock available"><span><?=
__(
'In stock') ?></span></div>
92 <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 class=
"action towishlist" data-action=
"add-to-wishlist" 102 data-post=
'<?= /* @escapeNotVerified */ $block->getAddToWishlistParams($_item) ?>' 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