// fix issue in feeder module

This commit is contained in:
aFolletete
2012-06-14 14:02:14 +00:00
parent eafa901c65
commit 2609f8ff7e
+4 -4
View File
@@ -31,9 +31,9 @@ require_once(dirname(__FILE__).'/../../init.php');
$number = ((int)(Tools::getValue('n')) ? (int)(Tools::getValue('n')) : 10); $number = ((int)(Tools::getValue('n')) ? (int)(Tools::getValue('n')) : 10);
$orderBy = Tools::getProductsOrder('by', Tools::getValue('orderby')); $orderBy = Tools::getProductsOrder('by', Tools::getValue('orderby'));
$orderWay = Tools::getProductsOrder('way', Tools::getValue('orderway')); $orderWay = Tools::getProductsOrder('way', Tools::getValue('orderway'));
$id_category = ((int)(Tools::getValue('id_category')) ? (int)(Tools::getValue('id_category')) : 1); $id_category = ((int)(Tools::getValue('id_category')) ? (int)(Tools::getValue('id_category')) : Configuration::get('PS_HOME_CATEGORY'));
$products = Product::getProducts((int)($cookie->id_lang), 0, ($number > 10 ? 10 : $number), $orderBy, $orderWay, $id_category, true); $products = Product::getProducts((int)Context::getContext()->language->id, 0, ($number > 10 ? 10 : $number), $orderBy, $orderWay, $id_category, true);
$currency = new Currency((int)($cookie->id_currency)); $currency = new Currency((int)Context::getContext()->currency->id);
$affiliate = (Tools::getValue('ac') ? '?ac='.(int)(Tools::getValue('ac')) : ''); $affiliate = (Tools::getValue('ac') ? '?ac='.(int)(Tools::getValue('ac')) : '');
// Send feed // Send feed
@@ -75,4 +75,4 @@ echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
} }
?> ?>
</channel> </channel>
</rss> </rss>