This code puts a ‘New!‘ badge on items that have been added recently. The setting in the example below is for products added in the last 30 days. A class has also been included to match the “onsale” button, but you can change the class name if you want to style it differently.
When an item is on sale, Classic Commerce normally just shows the regular price and the sale price. It can be helpful to also show how much the customer will be saving by using this code. You can style the message by using the included class “was-now-save”.