We use cookies to improve our services and provide a better experience. By continuing to use this site, you agree with our Cookies Policy.

More than 400 step-by-step articles to guide you through online project development.
HomeTutorialsCMS TutorialsMagentoMagento Administration

How to set the pubdate for new products feed

If you want to adjust the feed of new products so that the RSS feed pubDate would be set to “news_from_date” the same as the current time.

To accomplish this, you will need to customize a code in your Magento installation. You will need to use an FTP client or a file manager.

Here you can see the code which you will need to use.

 $data = array(
'title'         => $product->getName(),
'link'          => $url,
'description'   => $description,
'lastUpdate'        => strtotime($product->getUpdatedAt()),

Note that if you’re using newer versions of Magento, you should use “lastUpdate” instead of “pubDate”. The provided code entry should be used in the “addNotifyItemXmlCallback” function in order to adjust the pubDate for the new products feed.

Rate this Tutorial:
No CommentsLeave a Comment