Advertisement
sambacar

Untitled

Feb 2nd, 2018
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.06 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Copyright © Magento, Inc. All rights reserved.
  4.  * See COPYING.txt for license details.
  5.  */
  6.  
  7. // @codingStandardsIgnoreFile
  8.  
  9. ?>
  10. <?php
  11. /** @var \Magento\Wishlist\Block\Customer\Wishlist\Items $block */
  12. $columns = $block->getColumns();
  13. $mobileColumns = ['customer.wishlist.item.name', 'customer.wishlist.item.price', 'customer.wishlist.item.review'];
  14. $isMobileContainerStarted = false;
  15. ?>
  16.  
  17. <div class="products-grid wishlist">
  18.     <?php $iterator = 1; ?>
  19.     <?php if (count($block->getItems())): ?>
  20.     <ol class="product-items">
  21.         <?php foreach ($block->getItems() as $item): ?>
  22.         <?= /* @noEscape */ ($iterator++ == 1) ? '<li data-row="product-item" class="product-item" id="item_' . $block->escapeHtmlAttr($item->getId()) . '">' : '</li><li class="product-item" id="item_' . $block->escapeHtmlAttr($item->getId()) . '">' ?>
  23.             <div class="product-item-info" data-container="product-grid">
  24.                 <?php /** Todo: sambolek - mobile display - start */ ?>
  25.                 <div class="wishlist-item-mobile-container">
  26.                 <?php foreach ($columns as $column): ?>
  27.                         <?php if (in_array($column->getNameInLayout(), $mobileColumns)): ?>
  28.                             <?php $column->setItem($item); echo $column->toHtml($item);?>
  29.                         <?php endif; ?>
  30.                 <?php endforeach; ?>
  31.                 </div>
  32.                 <?php /** Todo: sambolek - mobile display - end */ ?>
  33.                 <?php foreach ($columns as $column): ?>
  34.                     <?php $column->setItem($item); echo $column->toHtml($item);?>
  35.                 <?php endforeach; ?>
  36.             </div>
  37.         <?= ($iterator == count($block->getItems())+1) ? '</li>' : '' ?>
  38.         <?php endforeach; ?>
  39.     </ol>
  40.     <?php else: ?>
  41.         <div class="message info empty">
  42.             <span><?= $block->escapeHtml(__('This Wish List has no Items')) ?></span>
  43.         </div>
  44.     <?php endif; ?>
  45. </div>
  46.  
  47. <?php foreach ($columns as $column): ?>
  48.     <?= $column->getAdditionalHtml() ?>
  49. <?php endforeach; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement