Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    May 2009
    Posts
    155
    Plugin Contributions
    0

    Default Show 'in stock' icon

    Is there a way to show an in stock icon on each product in stock?
    I have seen other websites with a little tick and 'in stock' beisde it which would be ideal but not sure if it can be done in zencart? We currently list all product and out of stock ones show as out of stock (with the back in stock notification link) but customers still email or call to ask if certain products are in stock so an icon added automatically to each item would be ideal (note I cannot add it individually to each item as there are 1000's in the shop).

    Any help appreciated - I had a search but there were too many repliesfor 'in stock' and none seemed relevant to this.

  2. #2
    Join Date
    May 2009
    Posts
    155
    Plugin Contributions
    0

    Default Re: Show 'in stock' icon

    Sorry am not sure how to delete/remove a new thread post, but for anyone else having the same problem I have found this thread that seems to cover it:
    http://www.zen-cart.com/forum/showth...stock+products

    I did search before posting but could not see anything but this thread now seems to remove the units in stock and replace it with 'in stock' or similar text of your own. I will try it now and report back if it solves the problem.

  3. #3
    Join Date
    Jul 2012
    Posts
    346
    Plugin Contributions
    0

    Default Re: Show 'in stock' icon

    How I can increase the size of in stock image (Green light)?
    When inspect element is shows 10"x10" but no where in css its mentioned. How I can increase it?
    Thank you

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Show 'in stock' icon

    You would need to replace the icon with a larger image. If that doesn't change the size, you might have to add a style rule to overcome a hardcoded size. Seeing your site live is always the best way to be sure of giving the best advice.

  5. #5
    Join Date
    Jul 2012
    Posts
    346
    Plugin Contributions
    0

    Default Re: Show 'in stock' icon

    Quote Originally Posted by gjh42 View Post
    You would need to replace the icon with a larger image. If that doesn't change the size, you might have to add a style rule to overcome a hardcoded size. Seeing your site live is always the best way to be sure of giving the best advice.
    Uploading large size file does not work. I figured this out.
    In stock_icon_defines.php it says dimensions for each next to defines like 10, 10 so by changing these numbers it does change and worked for me.

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Show 'in stock' icon

    Right, I had forgotten how I set that up :)

  7. #7
    Join Date
    Jul 2012
    Posts
    346
    Plugin Contributions
    0

    Default Re: Show 'in stock' icon

    But those numbers controls both product detail page and categories page.
    How I can have separate numbers for category page as you may know image should be small on products list in category page compare to product detail page. (product listing vs product info)

  8. #8
    Join Date
    Apr 2014
    Posts
    154
    Plugin Contributions
    0

    Default Re: Show 'in stock' icon

    Quote Originally Posted by jsarwar View Post
    But those numbers controls both product detail page and categories page.
    How I can have separate numbers for category page as you may know image should be small on products list in category page compare to product detail page. (product listing vs product info)
    Simple, since the defines are in its own language file, just give a different define to the product listing and product info pages. And modify one of those files with the NEW define. So in the end you will have control over them separately by changing the width and height. And you can control the images to use separately as well.

  9. #9
    Join Date
    Jul 2012
    Posts
    346
    Plugin Contributions
    0

    Default Re: Show 'in stock' icon

    Quote Originally Posted by yaritai View Post
    Simple, since the defines are in its own language file, just give a different define to the product listing and product info pages. And modify one of those files with the NEW define. So in the end you will have control over them separately by changing the width and height. And you can control the images to use separately as well.
    Thank you but there is only one language file for both. How I can define separately in 1 file?

  10. #10
    Join Date
    Apr 2014
    Posts
    154
    Plugin Contributions
    0

    Default Re: Show 'in stock' icon

    Quote Originally Posted by jsarwar View Post
    Thank you but there is only one language file for both. How I can define separately in 1 file?
    I had downloaded the plugin to take a closer look and actually it will take more than duplicating the define in the language file as the icon is set in the function "product_stock_icon".

    For the define, duplicate it like this:

    Code:
    define('PRODUCT_LISTING_STATUS_QTY_GREEN_ICON',zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_green.gif', 'in stock', 10, 10));
    So the above will be a separate define for the green icon for the product listing page. You will do the same for all other defines you need seperated. Now to use the new define for the product listing php file, the easiest way is to duplicate the function and change the relevant defines to the new one you made above. Just add this duplicate funtion below the one included.

    And last in the product listing php file, change the function to your new function you created above.

    This will now provide you with separate controls for both. This is the simplest way for you to do what you want.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Stock Icon [support]
    By gjh42 in forum All Other Contributions/Addons
    Replies: 12
    Last Post: 17 Apr 2013, 01:12 PM
  2. Stock by attributes show stock levels placement error
    By fradesigns in forum General Questions
    Replies: 0
    Last Post: 17 Oct 2007, 01:14 AM
  3. Either show free shipping icon w/ freeoptions OR show other modules w/ freeshipper
    By tvadpro in forum Built-in Shipping and Payment Modules
    Replies: 11
    Last Post: 3 Dec 2006, 02:53 AM
  4. No images or Out of Stock icon
    By JDR in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 15 Nov 2006, 12:21 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR