Jump to content

RSS New Products with Date & Time


Recommended Posts

hello this is my first post, i am trying to creat rss feed for new products i add, ut the default module doesnot displays date and time in the rss feed.

can any one help how i can add date and time to the RSS fedd, i need this to update tweeter through rss feed

Link to comment
Share on other sites

It is modules/feeder/rss.php that you'll need to modify. You'll need to add something like the following before line 45:

echo '\t\t\t' . date_format('%a, %b %d %H:%i:%S %Y GMT', $product['date_add']) . '\n';



I don't have time to test this code. It will probably fail, but it should give you an idea of what needs to be done to add the date to the RSS feed. Please let us know what code you used if you get it to work.

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 months later...

has anyone been able to get this to work? I put the following code from the above post into the rss.php file:

echo '\t\t\t' . date_format('%a, %b %d %H:%i:%S %Y GMT', $product['date_add']) . '\n';



but the output was \t\t\t\n not the date.

I mean it actually puts \t\t\t\n on the output file in place of the date so there must be some syntax line in the original code posted?

if I change the code to:

echo "\t\t\t" . date_format("%a, %b %d %H:%i:%S %Y GMT", $product['date_add']) . "\n";



then the output is nothing (or at most a black space). I just changed the ' to "

Link to comment
Share on other sites

I found this on another site:


<?php echo date(“D, d M Y H:i:s O”, strtotime($date)); ?>



is there anyway to modify it to work? I tried replacing the "%a, %b %d %H:%i:%S %Y GMT" in the original code with “D, d M Y H:i:s O” and that didn't work.

Link to comment
Share on other sites

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...