Date along side the product?

Posts: 47
Joined: 12/11/2007

Is it possible to show a date (e.g: added on 14/01/2008 and updated on 16/01/2008 in case of update) along side the product so that a customer knows whether the product is new or not?

And can there be a specific page where a customer can see the products added according to date (ascending, descending or can sort list). In this case there should also be an option for Admin to change the date as necessary.

What do you think guys? Will it be handy. For my websites where I add designs every week and month, it would surely help my present customers to get the new product without crawling all around the website again.

I'm using "New Arrivals" page but as I go on adding product it really doesn't help the most.

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

It's in the strangest place in Drupal 5, but you're looking for the Post information setting in Site building > Themes > Global settings. Make sure the boxes next to your products are checked. If they already are, you need to dive into the node template of your theme. Look for a line like

<?php
if ($submitted):
?>

The lines after that should deal with $node->created.

If you need to, you can steal some code from other themes. Here's Garland's in full:

<?php
if ($submitted):
?>

<?php
print t('!date — !username', array('!username' => theme('username', $node), '!date' => format_date($node->created)));
?>

<?php
endif;
?>