* @copyright 2007-2011 PrestaShop SA * @version Release: $Revision: 7046 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ include(dirname(__FILE__).'/../../config/config.inc.php'); require_once(dirname(__FILE__).'/../../init.php'); // Get data $number = ((int)(Tools::getValue('n')) ? (int)(Tools::getValue('n')) : 10); $orderBy = Tools::getProductsOrder('by', Tools::getValue('orderby')); $orderWay = Tools::getProductsOrder('way', Tools::getValue('orderway')); $id_category = ((int)(Tools::getValue('id_category')) ? (int)(Tools::getValue('id_category')) : 1); $products = Product::getProducts((int)($cookie->id_lang), 0, ($number > 10 ? 10 : $number), $orderBy, $orderWay, $id_category, true); $currency = new Currency((int)($cookie->id_currency)); $affiliate = (Tools::getValue('ac') ? '?ac='.(int)(Tools::getValue('ac')) : ''); // Send feed header("Content-Type:text/xml; charset=utf-8"); echo ''."\n"; ?> <![CDATA[<?php echo Configuration::get('PS_SHOP_NAME') ?>]]> PrestaShop id_lang)); ?> <![CDATA[<?php echo Configuration::get('PS_SHOP_NAME') ?>]]> id_lang), $product['id_product']); echo "\t\t\n"; echo "\t\t\t<![CDATA[".$product['name']." - ".html_entity_decode(Tools::displayPrice(Product::getPriceStatic($product['id_product']), $currency), ENT_COMPAT, 'UTF-8')." ]]>\n"; echo "\t\t\t"; $cdata = true; if (is_array($image) AND sizeof($image)) { $imageObj = new Image($image[0]['id_image']); echo "getExistingImgPath()."-small.jpg' title='".str_replace('&', '', $product['name'])."' alt='thumb' />"; $cdata = false; } if ($cdata) echo "\n"; echo "\t\t\tgetproductLink($product['id_product'], $product['link_rewrite'], Category::getLinkRewrite((int)($product['id_category_default']), $cookie->id_lang))).$affiliate."]]>\n"; echo "\t\t\n"; } ?>