'name', 1 => 'price', 2 => 'date_add', 3 => 'date_upd', 4 => 'position'); $orderWayValues = array(0 => 'ASC', 1 => 'DESC'); $orderBy = Tools::strtolower(Tools::getValue('orderby', $orderByValues[intval(Configuration::get('PS_PRODUCTS_ORDER_BY'))])); $orderWay = Tools::strtoupper(Tools::getValue('orderway', $orderWayValues[intval(Configuration::get('PS_PRODUCTS_ORDER_WAY'))])); if (!in_array($orderBy, $orderByValues)) $orderBy = $orderByValues[0]; if (!in_array($orderWay, $orderWayValues)) $orderWay = $orderWayValues[0]; $id_category = (intval(Tools::getValue('id_category')) ? intval(Tools::getValue('id_category')) : 1); $products = Product::getProducts(intval($cookie->id_lang), 0, ($number > 10 ? 10 : $number), $orderBy, $orderWay, $id_category, true); $currency = new Currency(intval($cookie->id_currency)); $affiliate = (Tools::getValue('ac') ? '?ac='.intval(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"; if (is_array($image) AND sizeof($image)) echo "<img src=""._PS_BASE_URL_.__PS_BASE_URI__."img/p/".$image[0]['id_product']."-".$image[0]['id_image']."-small.jpg" title="".str_replace('&', '', $product['name'])."" alt="thumb" />"; echo "\n"; echo "\t\t\tgetproductLink($product['id_product'], $product['link_rewrite'], Category::getLinkRewrite(intval(Tools::getValue('id_category')), $cookie->id_lang))).$affiliate."]]>\n"; echo "\t\t\n"; } ?>