Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2005
    Posts
    174
    Plugin Contributions
    0

    Default Icon on new items?

    I've been trying to search for an answer to this, but apparently the word "new" is too short to search on!

    Is there a way to display a small icon below the item thumbnail on category pages if the item is new (as specified under Maximum Values > New Product Listing - Limited to ...)?

    I can't figure out how to update product_listing.php to check if a product is new.

    Thanks!

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Icon on new items?

    Anything is possible - but, it is not built in at this time.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Mar 2005
    Posts
    174
    Plugin Contributions
    0

    Default Re: Icon on new items?

    I don't suppose anyone would know the code that's needed to check if an item is new for the product listing page? :)

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Icon on new items?

    The easiest way is to add the new image to the display price function ...

    Do you want to see the new image everywhere that you see a product with its price displayed?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Mar 2005
    Posts
    174
    Plugin Contributions
    0

    Default Re: Icon on new items?

    Ack, I never saw the reply to this - still looking for a solution.

    Ideally, the "new" icon image would be displayed next to the item title on the category page, but I'll take what I can get. I've been fiddling with the product_listing.php file, but it doesn't seem to be recognizing "$listing->fields['products_date_added']"...

    Anyone have a solution for this?

  6. #6
    Join Date
    Feb 2008
    Location
    Singapore
    Posts
    22
    Plugin Contributions
    0

    Default Re: Icon on new items?

    Did anyone figure this out? I am trying to add the word "new" to the side of my new items, but I cannot figure it out.

  7. #7
    Join Date
    Mar 2005
    Location
    Tempe, AZ
    Posts
    324
    Plugin Contributions
    0

    Default Re: Icon on new items?

    Has anyone figured this out or worked on it ?
    Lextechs.com Powered By ZenCart

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Icon on new items?

    If you look at the functions_prices.php file you will see the line:
    PHP Code:
      function zen_get_products_display_price($products_id) { 
    There the price is built for the display with the bottom line being:
    PHP Code:
        return $final_display_price $free_tag $call_tag
    If you changed that to:
    PHP Code:
        return $final_display_price $free_tag $call_tag '<br />Fred was here'
    You would see that on all of the prices ...

    You could use this same idea to see if the products are new and if so, add a new image on the end ...

    This is used in the whats_new sidebox to determin what products are new, you can use an adaption of this select statement to determin if the current product is new ...
    PHP Code:
      $display_limit zen_get_new_date_range();
      
    $random_whats_new_sidebox_product_query "select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name,
                                                  p.master_categories_id
                               from (" 
    TABLE_PRODUCTS " p
                               left join " 
    TABLE_PRODUCTS_DESCRIPTION " pd on p.products_id = pd.products_id )
                               where p.products_id = pd.products_id
                               and p.products_status = 1 " 
    $display_limit
    Note: you can cut a lot out of that select statement but the idea is to do the select based on the $display_limit that is built from the zen_get_new_date_range() and if your product comes back, then it is new and you can add the image to the return on the display price function ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Aug 2008
    Posts
    2
    Plugin Contributions
    0

    Default Re: Icon on new items?

    our online store itself is new but the business is not. is there a way to have zen cart check an attribute to determine newness of an item instead of checking when the product was added. this would be HUGE for me.

    thanks,
    -j

 

 

Similar Threads

  1. Replies: 29
    Last Post: 19 Sep 2014, 03:43 AM
  2. How Display a NEW logo or icon in product listing for new products
    By triumph in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 29 Dec 2010, 09:35 AM
  3. Putting text 'Refresh Items' in above icon?
    By KismetDesign in forum General Questions
    Replies: 0
    Last Post: 11 Nov 2009, 12:13 AM
  4. Icon or text to differenciate NEW and PREOWNED items?
    By xtina in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 14 Sep 2009, 07:49 PM
  5. New Product Icon....
    By modernm in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 6 May 2009, 10:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg