Announcement

Collapse
No announcement yet.

How can I show the 'Last Updated Date' on the product pages?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How can I show the 'Last Updated Date' on the product pages?

    You can show this date by placing some Java Script into the layout of where you want it to appear

    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    <!-Begin
    var dateObj = new Date(document.lastModified)
    document.write("Last Updated: " + dateObj.toLocaleString());
    // End -->
    </SCRIPT>

    The above will print the date and time adjusted to the viewers local time. To show the time in UTC format, replace the toLocale with toUTC.

    Adding the script into a fragment or product text field
    The script above can be added to SellerDeck product or fragment text fields by surrounding the code with the software's HTML escape characters !!< and >!! eg: -

    !!<
    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    <!-Begin
    var dateObj = new Date(document.lastModified)
    document.write("Last Updated: " + dateObj.toLocaleString());
    // End -->
    </SCRIPT>
    >!!
Working...
X