Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <{assign var="products" value=$landing_page->getProducts()}>
- <xml>
- <title><{$landing_page->getName()|escape}></title>
- <products>
- <{section name="i" loop=$products}>
- <{if $products[i]->hasVariants()}>
- <{assign var="profile" value=$products[i]->getProfile()}>
- <{assign var="attr" value=$profile->getAttributeList()}>
- <{section name="j" loop=$attr}>
- <{assign var="tempname" value=""}>
- <{if $attr[j]->getIsVariant()}>
- <{if $attr[j]->getDataType() == "valuelist"}>
- <{assign var="values" value=$attr[j]->getValues()}>
- <{section name="k" loop=$values}>
- <{if $products[i]->getInStock($attr[j]->getAttributeId(), $values[k]->getAttributeValueId()) > 0}>
- <{if $attribute_price}>
- <{assign var="tempattributeprice" value=$attribute_price}>
- <{/if}>
- <{assign var="tempname" value=$values[k]->getVal()}>
- <{/if}>
- <{if $products[i]->getInStock($attr[j]->getAttributeId(), $values[k]->getAttributeValueId()) > 0}>
- <product>
- <id><{$products[i]->getOwnId($values[k]->getAttributeValueId(), $attr[j]->getAttributeId())}></id>
- <link><{$products[i]->getRemoteUrl()}>#attributeid=<{$values[k]->getAttributeValueId()}></link>
- <title><{$products[i]->getMetaTitle()|escape}></title>
- <name><{$products[i]->getName()|escape}><{if $tempname}> <{$tempname}><{/if}></name>
- <description><{$products[i]->getDescription()|escape}></description>
- <{assign var="images" value=$products[i]->getImages()}>
- <{if $images}>
- <{section name="m" loop=$images start=0 max=1}>
- <image><{$webshop->getUrl()}><{$images[m]->getSrc(500, 500, 'fit')}></image>
- <{/section}>
- <{/if}>
- <{if $tempattributeprice}>
- <price><{$tempattributeprice|number_format:2:".":""}></price>
- <{else}>
- <price><{$products[i]->getRealPrice()|number_format:2:".":""}></price>
- <{/if}>
- <costprice><{$products[i]->getPurchasePrice()|number_format:2:".":""}></costprice>
- <{if $products[i]->getGtin($values[k]->getAttributeValueId(), $attr[j]->getAttributeId())}>
- <gtin><{$products[i]->getGtin($values[k]->getAttributeValueId(), $attr[j]->getAttributeId())}></gtin>
- <{/if}>
- <stock><{$products[i]->getInStock($attr[j]->getAttributeId(), $values[k]->getAttributeValueId())}></stock>
- <{assign var="tempbrand" value=$products[i]->getBrand()}>
- <{if $tempbrand}>
- <brand><{$tempbrand->getName()|escape}></brand>
- <{/if}>
- <{if $products[i]->getMetaValue("producttype")}>
- <product_type><{$products[i]->getMetaValue("producttype")}></product_type>
- <{/if}>
- </product>
- <{/if}>
- <{/section}>
- <{/if}>
- <{/if}>
- <{/section}>
- <{else}>
- <product>
- <id><{$products[i]->getOwnId()}></id>
- <link><{$products[i]->getRemoteUrl()}></link>
- <title><{$products[i]->getMetaTitle()|escape}></title>
- <name><{$products[i]->getName()|escape}></name>
- <description><{$products[i]->getDescription()|escape}></description>
- <{assign var="images" value=$products[i]->getImages()}>
- <{if $images}>
- <{section name="j" loop=$images start=0 max=1}>
- <image><{$webshop->getUrl()}><{$images[j]->getSrc(500, 500, 'fit')}></image>
- <{/section}>
- <{/if}>
- <price><{$products[i]->getRealPrice()|number_format:2:".":""}></price>
- <costprice><{$products[i]->getPurchasePrice()|number_format:2:".":""}></costprice>
- <gtin><{$products[i]->getGtin()}></gtin>
- <stock><{$products[i]->getStockCount()}></stock>
- <{assign var="tempbrand" value=$products[i]->getBrand()}>
- <{if $tempbrand}>
- <brand><{$tempbrand->getName()|escape}></brand>
- <{/if}>
- <{if $products[i]->getMetaValue("producttype")}>
- <product_type><{$products[i]->getMetaValue("producttype")}></product_type>
- <{/if}>
- </product>
- <{/if}>
- <{/section}>
- </products>
- </xml>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement