timgaunt Posted August 4, 2008 Posted August 4, 2008 I need a module that will allow me to add the text "New" to new products i.e. on the listing pages but I can't find anything. Has anyone got any suggestions? Tim
♥geoffreywalton Posted August 4, 2008 Posted August 4, 2008 Test the date added and if it is within the last 7 days display a "new" image. The php section of the site www.w3shools.com will help. Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
spooks Posted August 4, 2008 Posted August 4, 2008 You need to first consider which listing module your going to mod, product_listing.php, new_products.php or products_new.php in the case of product_listing.php the query does not contain date info, so you need to add p.products_date_added to the query. then you need to set up a date for comparison: $date = strtotime("-30 days"); // set max age of product $date = strftime("%Y-%m-%d",$date); then do if ($query['products_date_added'] > $date) echo tep_image('button_new.gif', IMAGE_NEW, '', '', 'class="thm_new"'); having made a 'new' gif Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al.
timgaunt Posted August 4, 2008 Author Posted August 4, 2008 Thanks guys but I don't think this should/could be an automated process, the client would like to "flag" the item as a new item i.e. with a checkbox... Any suggestions?
spooks Posted August 4, 2008 Posted August 4, 2008 Thats more involved, as you're going have to add mods to admin and the dBAse as well. So your going to need some knowledge of php & sql, if you don't them best tell them you cant do it, unless you can pursuade someone to code for you. Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.