10 <?php
if (($_products =
$block->getProductCollection()) && $_products->getSize()): ?>
11 <div
class=
"block widget block-new-products-list">
12 <div
class=
"block-title">
13 <strong><?=
__(
'New Products') ?></strong>
15 <div
class=
"block-content">
17 <ol
class=
"product-items" id=
"widget-new-products-<?= /* @escapeNotVerified */ $suffix ?>">
18 <?php
foreach ($_products->getItems() as
$_product): ?>
19 <li
class=
"product-item">
20 <div
class=
"product-item-info">
21 <a
class=
"product-item-photo" href=
"<?= /* @escapeNotVerified */ $_product->getProductUrl() ?>" 22 title=
"<?= /* @escapeNotVerified */ $block->stripTags($_product->getName(), null, true) ?>">
23 <?=
$block->getImage(
$_product,
'side_column_widget_product_thumbnail')->toHtml() ?>
25 <div
class=
"product-item-details">
26 <strong
class=
"product-item-name">
27 <a href=
"<?= /* @escapeNotVerified */ $_product->getProductUrl() ?>" 28 title=
"<?= /* @escapeNotVerified */ $block->stripTags($_product->getName(), null, true) ?>)" class=
"product-item-link">
29 <?= $this->helper(
'Magento\Catalog\Helper\Output')->productAttribute(
$_product,
$_product->getName(),
'name') ?>
33 <div
class=
"product-item-actions">
34 <div
class=
"actions-primary">
37 <button type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>" 38 class=
"action tocart primary" 39 data-
mage-init=
'{"redirectUrl":{"url":"<?= /* @escapeNotVerified */ $block->getAddToCartUrl($_product) ?>"}}'>
40 <span><?=
__(
'Add to Cart') ?></span>
44 $postDataHelper = $this->helper(
'Magento\Framework\Data\Helper\PostHelper');
47 <button type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>" 48 class=
"action tocart primary" 49 data-post=
'<?= /* @escapeNotVerified */ $postData ?>'>
50 <span><?=
__(
'Add to Cart') ?></span>
55 <div
class=
"stock available" title=
"<?= /* @escapeNotVerified */ __('Availability') ?>">
56 <span><?=
__(
'In stock') ?></span>
59 <div
class=
"stock unavailable" title=
"<?= /* @escapeNotVerified */ __('Availability') ?>">
60 <span><?=
__(
'Out of stock') ?></span>
71 <?=
$block->getPagerHtml() ?>
if( $form)() ?>< script > require(['jquery' mage mage