Insydius Posted March 17, 2018 Posted March 17, 2018 Hello, By default IP.Nexus (Commerce) stores the timestamp when a product is added to the database in the table nexus_package as p_date_added in epoch time format. I was hoping to have this displayed above the pricing and below the product title on the product page in human format MM/DD/YYYY. Thanks!
IPCommerceFan Posted March 18, 2018 Posted March 18, 2018 Edit the Nexus --> Front --> Package template, then Find: <h1 class='ipsType_pageTitle ipsType_largeTitle'>{$item->mapped('title')}</h1> and add this below it (or wherever you see fit): {expression="\IPS\DateTime::ts( $package->date_added )->strFormat('%m/%d/%Y')"} Thats it!
Adriano Faria Posted March 18, 2018 Posted March 18, 2018 Or simply: {expression="\IPS\DateTime::ts( $package->date_added )->format( 'm/d/Y' )"}
Mark Posted March 18, 2018 Posted March 18, 2018 The best way is: {datetime="$package->date_added"} Will ensure format consistency with the rest of thw suite, outputted as <time> tags
Recommended Posts
Archived
This topic is now archived and is closed to further replies.