Jump to content



Latest News: (loading..)

- - - - -

Hide Products with 0 quantity


This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#-19   jonesy827

jonesy827
  • Members
  • 19 posts

Posted 09 July 2011 - 08:40 PM

Hi, I have searched and read countless threads but cannot find a solution. I want to have our site only show in stock items, and not show any out of stock items. We use a custom script we bought to integrate with our Stone Edge order manager software and it updates quantities for products as we receive them, sell them, or any other reason we change QOH in that specific software.

I have it configured so that if an item sells out via the site it will be set to inactive. Is there anything we can do to achieve this? I figure it would be as simple as running a script that checks stock level, then executes an SQL query that changes it to inactive if it has a 0 quantity, and to active if it has over 0 quantity. Unfortunately I am not comfortable coding a php script due to security issues. I could not find any scripts that do this, and am also concerned as to the load it would put on the server (we use 1and1 web hosting currently, but have been considering moving).

Does anyone know of any existing contributions that would help me with this?

EDIT: Thought I should add that we have about 900 products in the cart currently, most of which are in stock. If we  get this working correctly we will most likely add the other 1800 or so out of stock products that we may or may not get in.

Edited by jonesy827, 09 July 2011 - 08:50 PM.


#-18   FIMBLE

FIMBLE
  • Community Sponsor
  • 6,576 posts

Posted 09 July 2011 - 10:01 PM

there are addons for hide product if zero stock yes, have you search the addons section?
Nic
Sometimes you're the dog and sometimes the lamp post

My Contributions

#-17   jonesy827

jonesy827
  • Members
  • 19 posts

Posted 10 July 2011 - 12:08 AM

I did quite a few searches, must not have been using the right keywords. Anyway, turns out that the information they gave me was false, and that the code actually does deactivate out of stock products automatically!

#-16   geoffreywalton

geoffreywalton

    Contact me for Support

  • Community Sponsor
  • 8,055 posts

Posted 10 July 2011 - 11:33 AM

Michael

I was just wondering who "they" are in your last post.

Anyway, if you use Easy Populate there isa parameter in it.

// If zero_qty_inactive is true, then items with zero qty will automatically be inactive in the store.
define ('EP_INACTIVATE_ZERO_QUANTITIES', false);  // default is false

Cheers

G
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 ======>>>>>.

#-15   jonesy827

jonesy827
  • Members
  • 19 posts

Posted 10 July 2011 - 10:24 PM

It was the salesperson at Stone Edge, the provider of the script. It has a setting that controls it. But we do use easy populate as well so thanks for the tip!