Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default automatic hide product when quantity 0

    Hello,
    Is there an option to automatically not display the product if its stock quantity is 0?
    Thanks.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: automatic hide product when quantity 0

    Admin->Configuration->Stock ... set "if product quantity is 0, set product status to" ... to 0
    This will disable any products whose quantity comes to zero after making the change.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default Re: automatic hide product when quantity 0

    thanks drbyte,
    i knew there was a setting in there some where!

  4. #4
    Join Date
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default Re: automatic hide product when quantity 0

    just a small note. if you change the quantity to 0 from admin, it won't automatic change the status. but if you are going to change the quantity from admin to 0 why not just change the status

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

    Default Re: automatic hide product when quantity 0

    That is a very good point to bring up ...

    Only Products who have their stock or quantity drop to <= 0 during the completion of an order will get set to products_status 0 ... or Out of Stock ...

    If you change the products_quantity manually, you will also have to manually set the product to Out of Stock or products_status 0 ...

    NOTE: If all Products that have products_quantity of <= 0 you could run the following SQL in the Tools ... Install SQL Patches ...
    Code:
    UPDATE products SET products_status = 0 WHERE products_quantity <= 0;
    Thanks again for pointing out something that is often times overlooked ...
    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!

  6. #6
    Join Date
    Mar 2009
    Posts
    414
    Plugin Contributions
    0

    Default Re: automatic hide product when quantity 0

    Hi. To avoid matching over 400 products one-by-one with a new download from my dropshipper, I set all products in the store to zero. I then overwrote the settings by uploading a current easy populate file with the correct product quantities for the non-zero-quantity products.

    I thought I would be able to then just set products with zero quantity to not show up in the store. I went to Admin>Configuration>Stock and did not find an option "if product quantity is 0 set status to 0."

    The only option I seem to have is to show zero-quantity products as "sold out."

    So is my only option now to compare all the products, and delete or make inactive the ones no longer available, one by one?

    I do have "Products status in Catalog when out of stock should be set to" set to zero.

    Thanks.
    Last edited by notageek; 21 Nov 2010 at 10:34 PM. Reason: add content

  7. #7
    Join Date
    Mar 2009
    Posts
    414
    Plugin Contributions
    0

    Default Re: automatic hide product when quantity 0

    I suppose the solution, if not going the route of the SQL patch mentioned above, is to now download the store through Easy Populate and set all zero products to inactive status, and re-upload. At least the zero quantity products will now be evident in the store download, quicker than a comparison one-by-one.

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

    Default Re: automatic hide product when quantity 0

    If you want to set the products_status of ALL Products to 0 where the products_quantity = 0 ... then backup your database, then you can use:
    Code:
    UPDATE products SET products_status = 0 WHERE products_quantity = 0;
    Now none of these will show in the Store as the products_status is 0 ...
    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!

 

 

Similar Threads

  1. How to hide quantity when it's over certain value?
    By Miro in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Jul 2010, 09:53 AM
  2. Hide sidebox product quantity
    By suzzylou in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Apr 2010, 01:14 PM
  3. shopping cart - hide the Cart Quantity Update button when not needed
    By dause in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 1 Oct 2009, 04:28 AM
  4. Automatic quantity update when clicking Checkout
    By DML73 in forum General Questions
    Replies: 0
    Last Post: 1 Jul 2009, 04:51 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