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

Tutorials

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

Cloud Servers 727 x 90

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.

1
2
3
4
5
6
 $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 Comments Leave a Comment
Leave a Comment

Cloud Servers 1 230×230

Other (215)

Popular Keywords

Web Banner 1 230×230