<?xml version="1.0"?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
 <channel>
 <title>COYS - Brand Store</title>
 <link>https://coys.com.ua
</link>
 <description>This is an online product catalog feed v.03</description>
 <?php $__currentLoopData = $items; $this->addLoop($__currentLoopData);$this->getFirstLoop();
 foreach($__currentLoopData as $item): $loop = $this->incrementLoopIndices();  ?>
 <?php 
 $parent = getRes($item->parent);
 $category = current($item->productCategory);
 ?>
 <item>
 <g:item_group_id><?php echo \htmlentities($item->id??'', ENT_QUOTES, 'UTF-8', false); ?></g:item_group_id>
 <g:id><?php echo $item->productArticul . '_' . currLang(); ?></g:id>
 <g:title><?php echo $item->pagetitle; ?></g:title>
 <g:description><?php echo str_replace(['&nbsp;', '&ldquo;', '&rdquo;'], '', strip_tags($item->content)); ?></g:description>
 <g:link><?php echo \htmlentities(resUrl($item->alias, true)??'', ENT_QUOTES, 'UTF-8', false); ?></g:link>
 <g:image_link><?php echo \htmlentities(url($item->img)??'', ENT_QUOTES, 'UTF-8', false); ?></g:image_link>
 <?php if(isset($item->productGallery)): ?>
 <?php $__currentLoopData = $item->productGallery; $this->addLoop($__currentLoopData);$this->getFirstLoop();
 foreach($__currentLoopData as $galleryItem): $loop = $this->incrementLoopIndices();  ?>
 <g:additional_image_link><?php echo \htmlentities(url(assetsUserfiles($galleryItem['img']))??'', ENT_QUOTES, 'UTF-8', false); ?>

 </g:additional_image_link>
 <?php endforeach; $this->popLoop(); $loop = $this->getFirstLoop(); ?>
 <?php endif; ?>
 <g:condition>new</g:condition>
 <g:availability><?php echo \htmlentities($item->productStatus == 'available' ? 'in_stock' : 'out_of_stock'??'', ENT_QUOTES, 'UTF-8', false); ?></g:availability>
 <g:price><?php echo \htmlentities(!empty($item->$oldPriceTv) ? $item->$oldPriceTv : $item->$priceTv??'', ENT_QUOTES, 'UTF-8', false); ?> <?php echo \htmlentities($currency??'', ENT_QUOTES, 'UTF-8', false); ?>

 </g:price>
 <g:sale_price><?php echo \htmlentities($item->$priceTv??'', ENT_QUOTES, 'UTF-8', false); ?> <?php echo \htmlentities($currency??'', ENT_QUOTES, 'UTF-8', false); ?></g:sale_price>
 <g:color><?php echo \htmlentities(current($item->productColor)['title']??'', ENT_QUOTES, 'UTF-8', false); ?></g:color>
 <?php $__currentLoopData = $item->productSize; $this->addLoop($__currentLoopData);$this->getFirstLoop();
 foreach($__currentLoopData as $size): $loop = $this->incrementLoopIndices();  ?>
 <g:size><?php echo \htmlentities($size??'', ENT_QUOTES, 'UTF-8', false); ?></g:size>
 <?php endforeach; $this->popLoop(); $loop = $this->getFirstLoop(); ?>
 <g:gender><?php echo \htmlentities($parent->link_attributes == 'women' ? 'female' : 'male'??'', ENT_QUOTES, 'UTF-8', false); ?></g:gender>
 <g:brand>COYS</g:brand>
 <g:product_type><?php echo \htmlentities(getFilterValues('category', $category)['title']??'', ENT_QUOTES, 'UTF-8', false); ?></g:product_type>
 <g:custom_label_0><?php echo \htmlentities(resUrl($parent->id, true) . '?category=' . $category??'', ENT_QUOTES, 'UTF-8', false); ?></g:custom_label_0>
 <?php $__currentLoopData = $item->productLabel; $this->addLoop($__currentLoopData);$this->getFirstLoop();
 foreach($__currentLoopData as $label): $loop = $this->incrementLoopIndices();  ?>
 <g:custom_label_<?php echo \htmlentities($loop->iteration??'', ENT_QUOTES, 'UTF-8', false); ?>><?php echo \htmlentities(resUrl($parent->id, true) . '?label=' . $label??'', ENT_QUOTES, 'UTF-8', false); ?>

 </g:custom_label_<?php echo \htmlentities($loop->iteration??'', ENT_QUOTES, 'UTF-8', false); ?>>
 <?php endforeach; $this->popLoop(); $loop = $this->getFirstLoop(); ?>
 </item>
 <?php endforeach; $this->popLoop(); $loop = $this->getFirstLoop(); ?>
 </channel>
</rss>
