Jump to content

How to add "date_add" field from products to the RSS page?


Recommended Posts

I need to figure out a way to add the 'date_add' field from the products table to show up in the rss.php page:

I poked a little around on the code, it looks like it could be dropped in here somehow, but my attampts haven't worked (I am not a PHP coder)



<?php

foreach ($products AS $product)

{

$image = Image::getImages(intval($cookie->id_lang), $product['id_product']);

echo "\t\t\n";

echo "\t\t\t<title><![CDATA[".$product['name']." - ".html_entity_decode(Tools::displayPrice(Product::getPriceStatic($product['id_product']), $currency), ENT_COMPAT, 'UTF-8')." ]]></title>\n";

echo "\t\t\t<img src="http://".htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__."img/p/".$image[0]['id_product']."-".$image[0]['id_image']."-small.jpg" title="".$product['name']."" alt="thumb" />

<![CDATA[".$product['description_short']."]]>\n";

echo "\t\t\t<link><![CDATA[".'http://'.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').htmlspecialchars($link->getproductLink($product['id_product'], $product['link_rewrite'], Tools::getValue('id_category'))).$affiliate."]]></link>\n";

echo "\t\t\n";

}

?>

Link to comment
Share on other sites

  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...