16 if ($exist =
$block->hasItems()) {
20 $image =
'related_products_list';
23 $limit =
$block->getPositionLimit();
24 $shuffle = (int)
$block->isShuffled();
25 $canItemsAddToCart =
$block->canItemsAddToCart();
36 if ($exist =
$block->getItems()->getSize()) {
40 $image =
'related_products_list';
45 $canItemsAddToCart =
$block->canItemsAddToCart();
55 if ($exist =
$block->hasItems()) {
59 $image =
'upsell_products_list';
60 $title =
__(
'We found other products you might like!');
62 $limit =
$block->getPositionLimit();
63 $shuffle = (int)
$block->isShuffled();
69 $canItemsAddToCart =
false;
75 if ($exist = count(
$block->getItemCollection()->getItems())) {
79 $image =
'upsell_products_list';
80 $title =
__(
'We found other products you might like!');
82 $limit =
$block->getItemLimit(
'upsell');
89 $canItemsAddToCart =
false;
93 case 'crosssell-rule':
95 if ($exist =
$block->hasItems()) {
99 $image =
'cart_cross_sell_products';
107 $canItemsAddToCart =
false;
113 if ($exist = count(
$block->getItems())) {
117 $image =
'cart_cross_sell_products';
125 $canItemsAddToCart =
false;
130 if ($exist =
$block->getProductCollection()) {
137 $image =
'new_products_content_widget_grid';
145 $canItemsAddToCart =
false;
156 <?php
if (
$type ==
'related' ||
$type ==
'upsell'): ?>
157 <?php
if (
$type ==
'related'): ?>
158 <div
class=
"block <?= /* @escapeNotVerified */ $class ?>" data-
mage-init=
'{"relatedProducts":{"relatedCheckbox":".related.checkbox"}}' data-limit=
"<?= /* @escapeNotVerified */ $limit ?>" data-shuffle=
"<?= /* @escapeNotVerified */ $shuffle ?>">
160 <div
class=
"block <?= /* @escapeNotVerified */ $class ?>" data-
mage-init=
'{"upsellProducts":{}}' data-limit=
"<?= /* @escapeNotVerified */ $limit ?>" data-shuffle=
"<?= /* @escapeNotVerified */ $shuffle ?>">
163 <div
class=
"block <?= /* @escapeNotVerified */ $class ?>">
165 <div
class=
"block-title title">
166 <strong
id=
"block-<?= /* @escapeNotVerified */ $class ?>-heading" role=
"heading" aria-level=
"2"><?=
$title ?></strong>
168 <div
class=
"block-content content" aria-labelledby=
"block-<?= /* @escapeNotVerified */ $class ?>-heading">
169 <?php
if (
$type ==
'related' && $canItemsAddToCart): ?>
170 <div
class=
"block-actions">
171 <?=
__(
'Check items to add to the cart or') ?>
172 <button type=
"button" class=
"action select" role=
"select-all"><span><?=
__(
'select all') ?></span></button>
175 <div
class=
"products wrapper grid products-grid products-<?= /* @escapeNotVerified */ $type ?>">
176 <ol
class=
"products list items product-items">
178 <?php $available =
''; ?>
179 <?php
if (!
$_item->isComposite() &&
$_item->isSaleable() &&
$type ==
'related'): ?>
180 <?php
if (!
$_item->getRequiredOptions()): ?>
181 <?php $available =
'related-available'; ?>
184 <?php
if (
$type ==
'related' ||
$type ==
'upsell'): ?>
185 <li
class=
"item product product-item" style=
"display: none;">
187 <li
class=
"item product product-item">
189 <div
class=
"product-item-info <?= /* @escapeNotVerified */ $available ?>">
190 <?=
'<!-- ' .
$image .
'-->' ?>
191 <a href=
"<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>" class=
"product photo product-item-photo">
194 <div
class=
"product details product-item-details">
195 <strong
class=
"product name product-item-name"><a
class=
"product-item-link" title=
"<?= $block->escapeHtml($_item->getName()) ?>" href=
"<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>">
205 <?php
if ($canItemsAddToCart && !
$_item->isComposite() &&
$_item->isSaleable() &&
$type ==
'related'): ?>
206 <?php
if (!
$_item->getRequiredOptions()): ?>
207 <div
class=
"field choice related">
208 <input type=
"checkbox" class=
"checkbox related" id=
"related-checkbox<?= /* @escapeNotVerified */ $_item->getId() ?>" name=
"related_products[]" value=
"<?= /* @escapeNotVerified */ $_item->getId() ?>" />
209 <label
class=
"label" for=
"related-checkbox<?= /* @escapeNotVerified */ $_item->getId() ?>"><span><?=
__(
'Add to Cart') ?></span></label>
215 <div
class=
"product actions product-item-actions">
217 <div
class=
"actions-primary">
218 <?php
if (
$_item->isSaleable()): ?>
219 <?php
if (
$_item->getTypeInstance()->hasRequiredOptions(
$_item)): ?>
220 <button
class=
"action tocart primary" data-
mage-init=
'{"redirectUrl": {"url": "<?= /* @escapeNotVerified */ $block->getAddToCartUrl($_item) ?>"}}' type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
221 <span><?=
__(
'Add to Cart') ?></span>
224 <?php $postDataHelper = $this->helper(
'Magento\Framework\Data\Helper\PostHelper');
227 <button
class=
"action tocart primary" 228 data-post=
'<?= /* @escapeNotVerified */ $postData ?>' 229 type=
"button" title=
"<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
230 <span><?=
__(
'Add to Cart') ?></span>
234 <?php
if (
$_item->getIsSalable()): ?>
235 <div
class=
"stock available"><span><?=
__(
'In stock') ?></span></div>
237 <div
class=
"stock unavailable"><span><?=
__(
'Out of stock') ?></span></div>
243 <?php
if ($showAddTo): ?>
244 <div
class=
"secondary-addto-links actions-secondary" data-role=
"add-to-links">
245 <?php
if ($addToBlock =
$block->getChildBlock(
'addto')): ?>
246 <?= $addToBlock->setProduct(
$_item)->getChildHtml() ?>
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
if( $block->getQuote() ->hasVirtualItems())( 'Other items in your order') ?></strong >< a hrefforeach( $block->getVirtualQuoteItems() as $_item)(__( 'Product Name')) ?>"><? endforeach
if( $block->isPagerDisplayed())() ?></td ></tr ><?php endif ?>< tr >< th class $items
if( $form)() ?>< script > require(['jquery' mage mage
$_option $_optionId $class
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode
if( $type=='related' &&$canItemsAddToCart)( 'Check items to add to the cart or') ?>< button type endif