Files
kupshop/web/common/templates/XMLFeed/Heureka.tpl
2025-08-02 16:30:27 +02:00

96 lines
3.2 KiB
Smarty

<?xml version="1.0" encoding="{$body.charset}"?>
{setfilter xml_string}
<SHOP>
{foreach $body.productsList as $products}
{if empty($products)}{break}{/if}
{foreach $products as $product}
{if $product.price_array.value_with_vat->isPositive()}
<SHOPITEM>
<ITEM_ID>{$product.id}_{$product.idv}</ITEM_ID>
<PRODUCTNAME>{$product.title|strip_tags}</PRODUCTNAME>
<PRODUCT>{$product.title|strip_tags}</PRODUCT>
{if $product.descr}
<DESCRIPTION>{$product.descr|strip_tags}</DESCRIPTION>
{/if}
<URL>{$product.url}{if $product.idv}?id_variation={$product.idv}{/if}</URL>
{if $product.images.main}
<IMGURL>{$product.images.main}</IMGURL>
{/if}
{foreach $product.images.others as $image}
<IMGURL_ALTERNATIVE>{$image}</IMGURL_ALTERNATIVE>
{/foreach}
<PRICE_VAT>{$price = roundPrice($product.price_array.value_with_vat)}{$price->printFloatValue()}</PRICE_VAT>
{foreach $product.variations as $values}
<PARAM>
<PARAM_NAME>{$label}</PARAM_NAME>
{foreach $values as $val}
<VAL>{$val}</VAL>
{/foreach}
</PARAM>
{/foreach}
{if $product.producer_name}
<MANUFACTURER>{$product.producer_name|strip_tags}</MANUFACTURER>
{/if}
<CATEGORYTEXT>{$product.category}</CATEGORYTEXT>
{if $product.ean}
<EAN>{$product.ean}</EAN>
{/if}
{if $product.delivery_time != -2} {* na dotaz - neuvadet *}
<DELIVERY_DATE>
{if $product.delivery_time >= 0}
{$product.delivery_time}
{elseif $product.delivery_time == -1}
2 {* 2-3 dny *}
{elseif $product.delivery_time == -3}
1 {* skladem u dodavatele *}
{/if}
</DELIVERY_DATE>
{/if}
<ITEMGROUP_ID>{$product.id}</ITEMGROUP_ID>
{if $product.code}
<PRODUCTNO>{$product.code}</PRODUCTNO>
{/if}
{block 'deliveries'}
{if findModule('deliveries')}
{foreach $body.deliveries as $delivery}
{if $delivery->getHeurekaDeliveryID() !== NULL}
<DELIVERY>
<DELIVERY_ID>{$delivery->getHeurekaDeliveryID()}</DELIVERY_ID>
<DELIVERY_PRICE>{if $delivery.price_dont_countin_from && $delivery.price_dont_countin_from->lowerThan($product.price_array.value_with_vat)}0{else}{$delivery.before_payment->printValue(0)}{/if}</DELIVERY_PRICE>
{if $delivery.cod_payment}
<DELIVERY_PRICE_COD>{if $delivery.price_dont_countin_from && $delivery.price_dont_countin_from->lowerThan($product.price_array.value_with_vat)}0{else}{$delivery.cod_payment->printValue(0)}{/if}</DELIVERY_PRICE_COD>
{/if}
</DELIVERY>
{/if}
{/foreach}
{/if}
{/block}
{block 'spec_element'}
{/block}
</SHOPITEM>
{/if}
{if $product@iteration is div by 100}
{flush nocache}
{/if}
{/foreach}
{/foreach}
</SHOP>
{/setfilter}