16 if ($exist = (
$block->getProductCollection() &&
$block->getProductCollection()->getSize())) {
17 $type =
'widget-new-grid';
21 $image =
'new_products_content_widget_grid';
34 <div
class=
"block widget block-new-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) ?>" 52 class=
"product-item-link">
65 <div
class=
"product-item-actions">
67 <div
class=
"actions-primary">
68 <?php
if (
$_item->isSaleable()): ?>
69 <?php
if (
$_item->getTypeInstance()->hasRequiredOptions(
$_item)): ?>
70 <button
class=
"action tocart primary" 71 data-
mage-init=
'{"redirectUrl":{"url":"<?= /* @escapeNotVerified */ $block->getAddToCartUrl($_item) ?>"}}' 72 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
73 <span><?=
__(
'Add to Cart') ?></span>
77 $postDataHelper = $this->helper(
'Magento\Framework\Data\Helper\PostHelper');
80 <button
class=
"action tocart primary" 81 data-post=
'<?= /* @escapeNotVerified */ $postData ?>' 82 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
83 <span><?=
__(
'Add to Cart') ?></span>
87 <?php
if (
$_item->getIsSalable()): ?>
88 <div
class=
"stock available"><span><?=
__(
'In stock') ?></span></div>
90 <div
class=
"stock unavailable"><span><?=
__(
'Out of stock') ?></span></div>
96 <div
class=
"actions-secondary" data-role=
"add-to-links">
97 <?php
if ($this->helper(
'Magento\Wishlist\Helper\Data')->isAllow() &&
$showWishlist): ?>
99 data-post=
'<?= /* @escapeNotVerified */ $block->getAddToWishlistParams($_item) ?>' 100 class=
"action towishlist" data-action=
"add-to-wishlist" 101 title=
"<?= /* @escapeNotVerified */ __('Add to Wish List') ?>">
102 <span><?=
__(
'Add to Wish List') ?></span>
106 <?php
$compareHelper = $this->helper(
'Magento\Catalog\Helper\Product\Compare');?>
107 <a href=
"#" class=
"action tocompare" 108 data-post=
'<?= /* @escapeNotVerified */ $compareHelper->getPostDataParams($_item) ?>' 109 title=
"<?= /* @escapeNotVerified */ __('Add to Compare') ?>">
110 <span><?=
__(
'Add to Compare') ?></span>
123 <?=
$block->getPagerHtml() ?>
if( $form)() ?>< script > require(['jquery' mage mage
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode