16 if ($exist = (
$block->getRecentlyViewedProducts() &&
$block->getRecentlyViewedProducts()->getSize())) {
17 $type =
'widget-viewed';
22 $image =
'recently_viewed_products_images_names_widget';
34 <div
class=
"block widget block-viewed-products-<?= /* @escapeNotVerified */ $mode ?>">
35 <div
class=
"block-title">
36 <strong><?=
$title ?></strong>
38 <div
class=
"block-content">
40 <ol
class=
"product-items" id=
"widget-viewed-<?= /* @escapeNotVerified */ $suffix ?>">
42 <li
class=
"product-item">
43 <div
class=
"product-item-info">
44 <a
class=
"product-item-photo" href=
"<?= /* @escapeNotVerified */ $_product->getProductUrl() ?>" 45 title=
"<?= /* @escapeNotVerified */ $block->stripTags($_product->getName(), null, true) ?>">
48 <div
class=
"product-item-details">
49 <strong
class=
"product-item-name">
50 <a href=
"<?= /* @escapeNotVerified */ $_product->getProductUrl() ?>" 51 title=
"<?= /* @escapeNotVerified */ $block->stripTags($_product->getName(), null, true) ?>" 52 class=
"product-item-link">
53 <?= $this->helper(
'Magento\Catalog\Helper\Output')->productAttribute(
$_product,
$_product->getName(),
'name') ?>
56 <?php echo
$block->getProductPriceHtml(
58 \
Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE,
59 \
Magento\Framework\Pricing\Render::ZONE_ITEM_LIST,
61 'price_id_suffix' =>
'-widget-viewed-' .
$suffix 64 <div
class=
"product-item-actions">
66 <div
class=
"actions-primary">
68 <button
class=
"action tocart primary" 69 data-
mage-init=
'{"redirectUrl": {"url": "<?= /* @escapeNotVerified */ $block->getAddToCartUrl($_product) ?>"}}' 70 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
71 <span><?=
__(
'Add to Cart') ?></span>
75 $postDataHelper = $this->helper(
'Magento\Framework\Data\Helper\PostHelper');
78 <button type=
"button" class=
"action tocart primary" data-post=
'<?= /* @escapeNotVerified */ $postData ?>'>
79 <span><?=
__(
'Add to Cart') ?></span>
85 <div
class=
"stock available"><span><?=
__(
'In stock') ?></span></div>
87 <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