<?php 
 $_get = $_get ?? [];
 $hash = $hash ?? null;
 ?>

<div class="item" id="list-item-<?php echo \htmlentities($item->id??'', ENT_QUOTES, 'UTF-8', false); ?>">
 <a href="<?php echo \htmlentities(makeUrl($item->id, $_get, $hash)??'', ENT_QUOTES, 'UTF-8', false); ?>" class="item-link">
 <img src="<?php echo \htmlentities(thumb($item->img)??'', ENT_QUOTES, 'UTF-8', false); ?>" alt="<?php echo \htmlentities($item->pagetitle??'', ENT_QUOTES, 'UTF-8', false); ?>">
 </a>

 <div class="name">
 <?php echo \htmlentities($item->pagetitle??'', ENT_QUOTES, 'UTF-8', false); ?>

 </div>

 <div class="price">
 <?php ( $oldPrice = getPrice($item, 'productOldPrice') ); ?>
 <?php ( $price = getPrice($item) ); ?>

 <?php if($oldPrice): ?>
 <div>
 <span class="old">
 <span>
 <?php echo \htmlentities($oldPrice??'', ENT_QUOTES, 'UTF-8', false); ?>

 </span>
 <?php echo \htmlentities(__('site.currency')??'', ENT_QUOTES, 'UTF-8', false); ?>

 </span>

 <div class="new">
 <span>
 <?php echo \htmlentities($price??'', ENT_QUOTES, 'UTF-8', false); ?>

 </span>
 <?php echo \htmlentities(__('site.currency')??'', ENT_QUOTES, 'UTF-8', false); ?>

 </div>
 </div>
 <?php elseif($price): ?>
 <div>
 <span><?php echo \htmlentities($price??'', ENT_QUOTES, 'UTF-8', false); ?></span>
 <?php echo \htmlentities(__('site.currency')??'', ENT_QUOTES, 'UTF-8', false); ?>

 </div>
 <?php endif; ?>
 </div>

 <?php if(isset($item->productColor) && count($item->productColor) > 0): ?>
 <div class="colors">
 <?php $__currentLoopData = $item->productColor; $this->addLoop($__currentLoopData);$this->getFirstLoop();
 foreach($__currentLoopData as $colorKey => $color): $loop = $this->incrementLoopIndices();  ?>
 <?php if(isset($color['title'])): ?>
 <div class="color-item">
 <span style="background:<?php echo \htmlentities($color['options']['background']??'', ENT_QUOTES, 'UTF-8', false); ?>;"></span>
 </div>
 <?php endif; ?>
 <?php endforeach; $this->popLoop(); $loop = $this->getFirstLoop(); ?>
 </div>
 <?php endif; ?>
</div>
