16 if ($exist = (
$block->getProductCollection() &&
$block->getProductCollection()->getSize())) {
17 $type =
'widget-new-list';
21 $image =
'new_products_content_widget_list';
24 $_helper = $this->helper(
'Magento\Catalog\Helper\Output');
35 <div
class=
"block widget block-new-products <?= /* @escapeNotVerified */ $mode ?>">
36 <div
class=
"block-title">
37 <strong role=
"heading" aria-level=
"2"><?=
$title ?></strong>
39 <div
class=
"block-content">
40 <?=
'<!-- ' .
$image .
'-->' ?>
41 <div
class=
"products-<?= /* @escapeNotVerified */ $mode ?> <?= /* @escapeNotVerified */ $mode ?>">
42 <ol
class=
"product-items <?= /* @escapeNotVerified */ $type ?>">
44 <li
class=
"product-item">
45 <div
class=
"product-item-info">
46 <a href=
"<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>" class=
"product-item-photo">
49 <div
class=
"product-item-details">
50 <strong
class=
"product-item-name">
51 <a title=
"<?= $block->escapeHtml($_item->getName()) ?>" 52 href=
"<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>" 53 class=
"product-item-link">
64 <div
class=
"product-item-actions">
66 <div
class=
"actions-primary">
67 <?php
if (
$_item->isSaleable()): ?>
68 <?php
if (
$_item->getTypeInstance()->hasRequiredOptions(
$_item)): ?>
69 <button
class=
"action tocart primary" 70 data-
mage-init=
'{"redirectUrl":{"url":"<?= /* @escapeNotVerified */ $block->getAddToCartUrl($_item) ?>"}}' 71 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
72 <span><?=
__(
'Add to Cart') ?></span>
76 $postDataHelper = $this->helper(
'Magento\Framework\Data\Helper\PostHelper');
79 <button
class=
"action tocart primary" 80 data-post=
'<?= /* @escapeNotVerified */ $postData ?>' 81 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
82 <span><?=
__(
'Add to Cart') ?></span>
86 <?php
if (
$_item->getIsSalable()): ?>
87 <div
class=
"stock available"><span><?=
__(
'In stock') ?></span></div>
89 <div
class=
"stock unavailable"><span><?=
__(
'Out of stock') ?></span></div>
95 <div
class=
"actions-secondary" data-role=
"add-to-links">
96 <?php
if ($this->helper(
'Magento\Wishlist\Helper\Data')->isAllow() &&
$showWishlist): ?>
98 data-post=
'<?= /* @escapeNotVerified */ $block->getAddToWishlistParams($_item) ?>' 99 class=
"action towishlist" data-action=
"add-to-wishlist" 100 title=
"<?= /* @escapeNotVerified */ __('Add to Wish List') ?>">
101 <span><?=
__(
'Add to Wish List') ?></span>
105 <?php
$compareHelper = $this->helper(
'Magento\Catalog\Helper\Product\Compare'); ?>
106 <a href=
"#" class=
"action tocompare" 107 title=
"<?= /* @escapeNotVerified */ __('Add to Compare') ?>" 108 data-post=
'<?= /* @escapeNotVerified */ $compareHelper->getPostDataParams($_item) ?>'>
109 <span><?=
__(
'Add to Compare') ?></span>
117 <div
class=
"product-item-description">
119 <a title=
"<?= $block->escapeHtml($_item->getName()) ?>" 120 href=
"<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>" 121 class=
"action more"><?=
__(
'Learn More') ?></a>
130 <?=
$block->getPagerHtml() ?>
if( $form)() ?>< script > require(['jquery' mage mage
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode