Hello,
Is there an option to automatically not display the product if its stock quantity is 0?
Thanks.
Hello,
Is there an option to automatically not display the product if its stock quantity is 0?
Thanks.
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.
thanks drbyte,
i knew there was a setting in there some where!
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![]()
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 ...
Thanks again for pointing out something that is often times overlooked ...Code:UPDATE products SET products_status = 0 WHERE products_quantity <= 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!
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
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.
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:
Now none of these will show in the Store as the products_status is 0 ...Code:UPDATE products SET products_status = 0 WHERE products_quantity = 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!