{{* funkcja przed usunięciem spacji *
{{function page_tree aPageTree=$aProduct.aPagesTree}}
	{{foreach from=$aPageTree.aPath item=aPage}}
		{{$aPage.sName}}
		{{if !$aPage@last}}
			/
		{{/if}}
	{{/foreach}}
{{/function}}
*}}

{{function page_tree aPageTree=$aProduct.aPagesTree}}{{foreach from=$aPageTree.aPath item=aPage}}{{$aPage.sName}}{{if !$aPage@last}}/{{/if}}{{/foreach}}{{/function}}

{{function page_tree_google aPageTree=$aProduct.aPagesTree}}{{foreach from=$aPageTree.aPath item=aPage}}{{$aPage.sName}}{{if !$aPage@last}} &gt; {{/if}}{{/foreach}}{{/function}}

{{function page_tree_skapiec aPageTree=$aProduct.aPagesTree}}{{foreach from=$aPageTree.aPath item=aPage}}{{$aPage.sName}}/{{/foreach}}{{$aPageTree.aCurrent.sName}}{{/function}}

{{if $aProductsInfo.sBlock == 'HEUREKA'}}
<?xml version="1.0" encoding="utf-8"?>
<SHOP xmlns="http://www.zbozi.cz/ns/offer/1.0">
{{foreach from=$aProductsInfo.aList item=aProduct}}
  <SHOPITEM>
    <ITEM_ID>{{$aProduct.iProduct}}</ITEM_ID>
    <PRODUCTNAME><![CDATA[{{$aProduct.sName}}]]></PRODUCTNAME>
    <DESCRIPTION><![CDATA[{{$aProduct.sDescriptionShort}}]]></DESCRIPTION>
    <URL><![CDATA[{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}]]></URL>
    <IMGURL><![CDATA[{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$aProduct.aDataImage.sFileName}}{{/if}}]]></IMGURL>
    <PRICE_VAT>{{$aProduct.fPrice}}</PRICE_VAT>
    <MANUFACTURER><![CDATA[{{$aProduct.aProducer.sName}}]]></MANUFACTURER>
		{{foreach from=$aPagesInfo[$aProduct.iPage].aZboziCategories item=sCategory}}
			<CATEGORYTEXT>Heureka.cz | {{$sCategory}}</CATEGORYTEXT>
		{{/foreach}}
    <DELIVERY_DATE>0</DELIVERY_DATE>
    <ITEMGROUP_ID></ITEMGROUP_ID>
  </SHOPITEM>
{{/foreach}}
</SHOP>
{{elseif $aProductsInfo.sBlock == 'ZBOZI'}}
<?xml version="1.0" encoding="utf-8"?>
<SHOP xmlns="http://www.zbozi.cz/ns/offer/1.0">
{{foreach from=$aProductsInfo.aList item=aProduct}}
  <SHOPITEM>
    <ITEM_ID>{{$aProduct.iProduct}}</ITEM_ID>
    <PRODUCTNAME><![CDATA[{{$aProduct.sName}}]]></PRODUCTNAME>
    <DESCRIPTION><![CDATA[{{$aProduct.sDescriptionShort}}]]></DESCRIPTION>
    <URL><![CDATA[{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}]]></URL>
    <IMGURL><![CDATA[{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$aProduct.aDataImage.sFileName}}{{/if}}]]></IMGURL>
    <PRICE_VAT>{{$aProduct.fPrice}}</PRICE_VAT>
    <MANUFACTURER><![CDATA[{{$aProduct.aProducer.sName}}]]></MANUFACTURER>
		{{foreach from=$aPagesInfo[$aProduct.iPage].aZboziCategories item=sCategory}}
			<CATEGORYTEXT>{{$sCategory}}</CATEGORYTEXT>
		{{/foreach}}
    <DELIVERY_DATE>0</DELIVERY_DATE>
    <ITEMGROUP_ID></ITEMGROUP_ID>
  </SHOPITEM>
{{/foreach}}
</SHOP>
{{elseif $aProductsInfo.sBlock == 'CENEO'}}
<?xml version="1.0" encoding="{{$config.charset}}"?>
<offers version="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<group name="other">
{{foreach from=$aProductsInfo.aList item=aProduct}}
	<o {{if !empty($aProduct.sWeight)}}weight="{{$aProduct.sWeight}}"{{/if}} avail="{{if $aProduct.iDays <= 1}}1{{elseif $aProduct.iDays <= 3}}3{{elseif $aProduct.iDays <= 7}}7{{else}}14{{/if}}" price="{{$aProduct.fPrice}}" url="{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}" id="{{$aProduct.iProduct}}" stock="{{$aProduct.TiStock}}">
		<cat><![CDATA[{{page_tree aPageTree=$aProduct.aPagesTree}}]]></cat>
		<name><![CDATA[{{$aProduct.sName}}]]></name>
		<desc><![CDATA[{{$aProduct.sDescriptionShort}}]]></desc>
		<imgs><main url="{{if !empty($aProduct.aDataImage)}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$config.max_image_size_full}}/{{$aProduct.aDataImage.sFileName}}{{/if}}" /></imgs>
		{{if count($aProduct.aAttributes) > 0}}
			<attrs>
				{{foreach from=$aProduct.aAttributes item=aAttribute}}
					<a name="{{$aAttribute.sAttributeName}}"><![CDATA[{{$aAttribute.sAttributeValue}}]]></a>
				{{/foreach}}
			</attrs>
		{{/if}}
	</o>
{{/foreach}}
</group>
</offers>
{{elseif $aProductsInfo.sBlock == 'INTERIA'}}
<?xml version="1.0" encoding="{{$config.charset}}"?>
<xmldata>
	<version>10</version>
	<header>
		<name>{{$config.title}}</name>
		<shopid>{{$config.skapiec_shop_id}}</shopid>
		<www>{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}</www>
		<time>{{$aProductsInfo.sInteriaDate}}</time>
	</header>
	{{if count( $aProductsInfo.aInteriaCategories ) > 0}}
		<category>
			{{foreach from=$aProductsInfo.aInteriaCategories item=aPage}}
				<catitem> 
					<catid>{{$aPage.iPage}}</catid>
					<catname><![CDATA[{{$aPage.sName}}]]></catname>
				</catitem>
			{{/foreach}}
		</category>
	{{/if}}
	<data>
		{{foreach from=$aProductsInfo.aList item=aProduct}}
			<item>
				<compid>{{$aProduct.iProduct}}</compid>
				<vendor></vendor>
				<desc><![CDATA[{{$aProduct.sName}}]]></desc>
				<price>{{$aProduct.fPrice}}</price>
				<dprice></dprice>
				<partnr></partnr>
				<catid>{{$aProduct.iPage}}</catid>
			</item>
		{{/foreach}}
	</data>
</xmldata>
{{elseif $aProductsInfo.sBlock == 'NOKAUT'}}
<?xml version="1.0" encoding="{{$config.charset}}"?>
<!DOCTYPE nokaut SYSTEM "http://www.nokaut.pl/integracja/nokaut.dtd">
<nokaut generator="SellSmart" ver="6.0">
  <offers>
		{{foreach from=$aProductsInfo.aList item=aProduct}}
			<offer>
				<id>{{$aProduct.iProduct}}</id>
				<name><![CDATA[{{$aProduct.sName}}]]></name>
				<description><![CDATA[{{$aProduct.sDescriptionShort}}]]></description>
				<url><![CDATA[{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}]]></url>
				<image><![CDATA[{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$config.max_image_size_full}}/{{$aProduct.aDataImage.sFileName}}{{/if}}]]></image>
				<price>{{$aProduct.fPrice}}</price>
				<category><![CDATA[{{page_tree aPageTree=$aProduct.aPagesTree}}]]></category>
				<producer><![CDATA[{{$aProduct.aProducer.sName}}]]></producer>
				<instock>{{$aProduct.TiStock}}</instock>
				<availability><![CDATA[{{$aProduct.sAvailable}}]]></availability>
			</offer>
		{{/foreach}}
	</offers>
</nokaut>
{{elseif $aProductsInfo.sBlock == 'ONET'}}
<?xml version="1.0" encoding="{{$config.charset}}"?>
<oferty aktualizacja="N" xmlns="http://www.zakupy.onet.pl/walidacja/oferty-partnerzy.xsd">
	{{foreach from=$aProductsInfo.aList item=aProduct}}
		<oferta>
			<identyfikator>{{$aProduct.iProduct}}</identyfikator> 
			<nazwa><![CDATA[{{$aProduct.sName}}]]></nazwa> 
			<url><![CDATA[{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}]]></url> 
			<cena>{{$aProduct.fPrice}}</cena> 
			<sciezka_kategorii><![CDATA[{{page_tree aPageTree=$aProduct.aPagesTree}}]]></sciezka_kategorii> 
			<id_kategorii_sklepu>{{$aProduct.iPage}}</id_kategorii_sklepu> 
			<marka_producent />
			<opis><![CDATA[{{$aProduct.sDescriptionShort}}]]></opis> 
			<zdjecie>{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$config.max_image_size_full}}/{{$aProduct.aDataImage.sFileName}}{{/if}}</zdjecie> 
		</oferta>
	{{/foreach}}
</oferty>
{{elseif $aProductsInfo.sBlock == 'WP'}}
<?xml version="1.0" encoding="{{$config.charset}}"?>
<wpoffers xmlns="http://zakupy.wp.pl/WPzakupySchema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://zakupy.wp.pl/ http://zakupy.wp.pl/WPzakupySchema.xsd">
	{{foreach from=$aProductsInfo.aList item=aProduct}}
		<offer>
			<src_id>{{$aProduct.iProduct}}</src_id>
			<name><![CDATA[{{$aProduct.sName}}]]></name>
			<description><![CDATA[{{$aProduct.sDescriptionShort}}]]></description>
			<url><![CDATA[{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}]]></url>
			<category><![CDATA[{{page_tree aPageTree=$aProduct.aPagesTree}}]]></category>
			<price>{{$aProduct.fPrice}}</price>
			<pic_url>{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$config.max_image_size_full}}/{{$aProduct.aDataImage.sFileName}}{{/if}}</pic_url>
		</offer>
	{{/foreach}}
</wpoffers>
{{elseif $aProductsInfo.sBlock == 'SKAPIEC'}}
<?xml version="1.0" encoding="{{$config.charset}}"?>
<xmldata>
  <version>12.0</version>
  <header>
    <name>{{$config.website_name}}</name>
      <www>{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}</www>
      <time>{{$aProductsInfo.sSkapiecDate}}</time>
  </header>
	<category>
	{{foreach from=$aProductsInfo.aSkapiecCategories item=aPage}}
		<catitem> 
			<catid>{{$aPage.iPage}}</catid>
			<catname><![CDATA[{{page_tree_skapiec aPageTree=$aPage.aPages}}]]></catname>
		</catitem>
	{{/foreach}}
	</category>	
  <data>
	{{foreach from=$aProductsInfo.aList item=aProduct}}
		<item>
			<compid>{{$aProduct.iProduct}}</compid>
			<vendor><![CDATA[{{$aProduct.aProducer.sName}}]]></vendor>
			<name><![CDATA[{{$aProduct.sName}}]]></name>
			<price>{{$aProduct.fPrice}}</price>
			<catid><![CDATA[{{$aProduct.iPage}}]]></catid>
			<foto>{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$config.max_image_size_full}}/{{$aProduct.aDataImage.sFileName}}{{/if}}</foto>
		</item>
	{{/foreach}}
  </data>
</xmldata>
{{elseif $aProductsInfo.sBlock == 'RADAR'}}
<?xml version="1.0" encoding="{{$config.charset}}"?>
<radar wersja="1.0">
	<oferta>
		{{foreach from=$aProductsInfo.aList item=aProduct}}
      <product>
        <grupa1>
					<nazwa><![CDATA[{{$aProduct.sName}}]]></nazwa>
					<producent></producent>
					<opis><![CDATA[{{$aProduct.sDescriptionShort}}]]></opis>
					<id>{{$aProduct.iProduct}}</id>
					<url>{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}</url>
					<foto>{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$config.max_image_size_full}}/{{$aProduct.aDataImage.sFileName}}{{/if}}</foto>  
					<kategoria><![CDATA[{{page_tree aPageTree=$aProduct.aPagesTree}}]]></kategoria>
					<cena>{{$aProduct.fPrice}}</cena>
					<dostepnosc></dostepnosc>
					<promocja></promocja>
        </grupa1>
      </product>
		{{/foreach}}
	</oferta>
</radar>
{{elseif $aProductsInfo.sBlock == '9SEKUND'}}
<?xml version="1.0" encoding="{{$config.charset}}"?>
<!DOCTYPE nokaut SYSTEM "http://www.nokaut.pl/integracja/nokaut.dtd">
<nokaut generator="SellSmart" ver="6.0">
  <offers>
		{{foreach from=$aProductsInfo.aList item=aProduct}}
			<offer>
				<id>{{$aProduct.iProduct}}</id>
				<name><![CDATA[{{$aProduct.sName}}]]></name>
				<description><![CDATA[{{$aProduct.sDescriptionShort}}]]></description>
				<url>{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}</url>
				<image>{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$aProduct.aDataImage.sFileName}}{{/if}}</image>
				<price>{{$aProduct.fPrice}}</price>
				<category><![CDATA[{{page_tree aPageTree=$aProduct.aPagesTree}}]]></category>
				<producer></producer>
			</offer>
		{{/foreach}}
	</offers>
</nokaut>
{{elseif $aProductsInfo.sBlock == 'OKAZJE'}}
<?xml version="1.0" encoding="{{$config.charset}}"?>
<okazje>
	<offers>
		{{foreach from=$aProductsInfo.aList item=aProduct}}
      <offer>
        <id>{{$aProduct.iProduct}}</id>
        <name><![CDATA[{{$aProduct.sName}}]]></name>
				<description><![CDATA[{{$aProduct.sDescriptionShort}}]]></description>
				<category><![CDATA[{{page_tree aPageTree=$aProduct.aPagesTree}}]]></category>
        <price>{{$aProduct.fPrice}}</price>
        <url>{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}</url>
        <producer></producer>
        <image>{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$aProduct.aDataImage.sFileName}}{{/if}}</image>
				<availability>{{$aProduct.iDays}}</availability>
      </offer>
		{{/foreach}}
	</offers>
</okazje>
{{elseif $aProductsInfo.sBlock == 'BAZARCEN' || $aProductsInfo.sBlock == 'KUPUJEMY'}}
	<?xml version="1.0" encoding="{{$config.charset}}"?>
	{{if $aProductsInfo.sBlock == 'BAZARCEN'}}
		<!DOCTYPE pasaz:Envelope SYSTEM "loadOffers.dtd">
		<pasaz:Envelope xmlns:pasaz="http://schemas.xmlsoap.org/soap/envelope/">
			<pasaz:Body>
				<loadOffers xmlns="urn:ExportB2B">
	{{/if}}
	<offers>
		{{foreach from=$aProductsInfo.aList item=aProduct}}
			<offer>
				<id>{{$aProduct.iProduct}}</id>
				<name><![CDATA[{{$aProduct.sName}}]]></name>
				<price>{{$aProduct.fPrice}}</price>
				<url>{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}</url>
				<categoryId><![CDATA[{{page_tree aPageTree=$aProduct.aPagesTree}}]]></categoryId>
				<description><![CDATA[{{$aProduct.sDescriptionShort}}]]></description>
				<image width="" height="" title="{{$aProduct.sName}}">{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$aProduct.aDataImage.sFileName}}{{/if}}</image>
			</offer>
		{{/foreach}}
	</offers>
	{{if $aProductsInfo.sBlock == 'BAZARCEN'}}
				</loadOffers>
			</pasaz:Body>
		</pasaz:Envelope>
	{{/if}}
{{elseif $aProductsInfo.sBlock == 'STARCODE_XML'}}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE starcode SYSTEM "http://www.starcode.pl/xml/dtd/starcode_xml.dtd">
<offers>
  <stat>
    <num>{{count( $aProductsInfo.aList )}}</num>
    <ver>2.0</ver>
  </stat>
	{{foreach from=$aProductsInfo.aList item=aProduct}}
		<product>
			<id>{{$aProduct.iProduct}}</id>
			<name><![CDATA[{{$aProduct.sName}}]]></name>
			<producer></producer>
			<code></code>
			<model></model>
			<description><![CDATA[{{$aProduct.sDescriptionShort}}]]></description>
			<url><![CDATA[{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}]]></url>
			<price><![CDATA[{{$aProduct.fPrice}}]]></price>
			<category><![CDATA[{{page_tree aPageTree=$aProduct.aPagesTree}}]]></category>
			<image><![CDATA[{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$aProduct.aDataImage.sFileName}}{{/if}}]]></image>
		</product>
	{{/foreach}}
</offers>
{{elseif $aProductsInfo.sBlock == 'NAJTANIEJ24'}}
<?xml version="1.0" encoding="UTF-8"?>
<produkty>
	{{foreach from=$aProductsInfo.aList item=aProduct}}
		<produkt>
			<id>{{$aProduct.iProduct}}</id>
			<kategoria><![CDATA[{{page_tree aPageTree=$aProduct.aPagesTree}}]]></kategoria>
			<nazwa><![CDATA[{{$aProduct.sName}}]]></nazwa>
			<url><![CDATA[{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}]]></url>
			<opis><![CDATA[{{$aProduct.sDescriptionShort}}]]></opis>
			<zdjecie>{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$aProduct.aDataImage.sFileName}}{{/if}}</zdjecie>
			<cena>{{$aProduct.fPrice}}</cena>
			<koszt_dostawy></koszt_dostawy>
			<czas_dostawy></czas_dostawy>
		</produkt>
	{{/foreach}}
</produkty>
{{elseif $aProductsInfo.sBlock == 'ZAKUPOMAT'}}
<?xml version="1.0" encoding="{{$config.charset}}"?>
<!DOCTYPE zakupomat SYSTEM "dtd.dtd">
<zakupomat>
	<meta>
		<generator version="2.1.0">SellSmart{{'VERSION'|constant}} kontakt@labsql.pl</generator>
	</meta>
	{{foreach from=$aProductsInfo.aList item=aProduct}}
		<offer id="{{$aProduct.iProduct}}" available="yes">
			<name><![CDATA[{{$aProduct.sName}}]]></name>
			<description><![CDATA[{{$aProduct.sDescriptionShort}}]]></description>
			<url><![CDATA[{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}]]></url>
			<imageurl>{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$aProduct.aDataImage.sFileName}}{{/if}}</imageurl>
			<price>{{$aProduct.fPrice}}</price>
			<category></category>
		</offer>
	{{/foreach}}
</zakupomat>
{{elseif $aProductsInfo.sBlock == 'CENUJ'}}
<?xml version="1.0" encoding="UTF-8"?>
<offers>
	{{foreach from=$aProductsInfo.aList item=aProduct}}
		<offer>
			<id>{{$aProduct.iProduct}}</id>
			<name><![CDATA[{{$aProduct.sName}}]]></name>
			<description><![CDATA[{{$aProduct.sDescriptionShort}}]]></description>
			<url><![CDATA[{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}]]></url>
			<image>{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$aProduct.aDataImage.sFileName}}{{/if}}</image>
			<price>{{$aProduct.fPrice}}</price>
			<category><![CDATA[{{page_tree aPageTree=$aProduct.aPagesTree}}]]></category>
			<producer></producer>
		</offer>
	{{/foreach}}
</offers>
{{elseif $aProductsInfo.sBlock == 'OFERCIAK'}}
<?xml version="1.0" encoding="UTF-8"?>
<oferciak>
	{{foreach from=$aProductsInfo.aList item=aProduct}}
		<offer>
			<id><![CDATA[{{$aProduct.iProduct}}]]></id>
			<name><![CDATA[{{$aProduct.sName}}]]></name>
			<description><![CDATA[{{$aProduct.sDescriptionShort}}]]></description>
			<category><![CDATA[{{page_tree aPageTree=$aProduct.aPagesTree}}]]></category>
			<producer></producer>
			<url><![CDATA[{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}]]></url>
			<image>{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$aProduct.aDataImage.sFileName}}{{/if}}</image>
			<price>{{$aProduct.fPrice}}</price>
		</offer>
	{{/foreach}}
</oferciak>
{{elseif $aProductsInfo.sBlock == 'SHOPPING'}}
<?xml version="1.0" encoding="{{$config.charset}}"?>
<shopping>
	{{foreach from=$aProductsInfo.aList item=aProduct}}
		<product>
			<name><![CDATA[{{$aProduct.sName}}]]></name>
			<description><![CDATA[{{$aProduct.sDescriptionShort}}]]></description>
			<price>{{$aProduct.fPrice}}</price>
			<product_url><![CDATA[{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}]]></product_url>
			<image_url>{{if !empty( $aProduct.aDataImage )}}{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$aProduct.aDataImage.sFileName}}{{/if}}</image_url>
			<category><![CDATA[{{page_tree aPageTree=$aProduct.aPagesTree}}]]></category>
			<manufacturer></manufacturer>
			<upc></upc>
			<mpn></mpn>
		</product>
	{{/foreach}}
</shopping>
{{elseif $aProductsInfo.sBlock == 'GOOGLE'}}
<?xml version="1.0"?>
<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0">
	<channel>
		<title>{{$config.title}}</title>
		<link>{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}</link>
		{{foreach from=$aProductsInfo.aList item=aProduct}}
		<item>
			<title>{{str_replace( '&', '&amp;', $aProduct.sName )}} {{$aProduct.sVariantName}}</title>
			<link>{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}</link>
			<mobile_link>{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$aProduct.sLinkName}}</mobile_link>
			<description><![CDATA[{{str_replace( ['&oacute;', '&nbsp;'], ['ó', ' '], $aProduct.sDescriptionShort )}}]]></description>
			<g:id>{{$aProduct.iProductVariant}}</g:id>
			<g:item_group_id>{{$aProduct.iProduct}}</g:item_group_id>
			<g:condition>{{if $aProduct.iNewUsed == 0}}new{{else}}used{{/if}}</g:condition>
			<g:price>{{$aProduct.fPrice}} {{$config.currency_symbol_ISO}}</g:price>
			<g:availability>{{if $aProduct.TiCanBuy}}in stock{{else}}out of stock{{/if}}</g:availability>
			{{if !empty( $aProduct.aDataImage )}}<g:image_link>{{$aUrl.scheme}}://{{$aUrl.host}}{{$aUrl.path}}{{$config.dir_files}}{{$aProduct.aDataImage.sFileName}}</g:image_link>{{/if}}
			<g:shipping>
				<g:country>PL</g:country>
				<g:service>{{$aProductsInfo.aCheapestCarrier.sName}}</g:service>
				<g:price>{{$aProductsInfo.aCheapestCarrier.fPrice}} {{$config.currency_symbol_ISO}}</g:price>
			</g:shipping>
			{{if !empty( $aProduct.sEan )}}<g:gtin>{{$aProduct.sEan}}</g:gtin>{{/if}}
			<g:brand><![CDATA[{{$aProduct.aProducer.sName}}]]></g:brand>
			{{if !empty( $aProduct.sCatalogNumber )}}<g:mpn>{{$aProduct.sCatalogNumber}}</g:mpn>{{/if}}
			{{if empty( $aProduct.sCatalogNumber ) && empty( $aProduct.sEan )}}<g:identifier_exists>FALSE</g:identifier_exists>{{/if}}
			{{if !empty( $aProduct.iGoogleCategory )}}<g:google_product_category>{{$aProduct.iGoogleCategory}}</g:google_product_category>{{/if}}
			<g:product_type>{{page_tree_google aPageTree=$aProduct.aPagesTree}}</g:product_type>
		</item>
		{{/foreach}}
	</channel>
</rss>
{{/if}}