Latest News: (loading..)
Sign in to follow this  
Followers 0
Cyperis

Product Status

4 posts in this topic

I think I'm overlooking something incredibly easy somewhere. Searches are turning up thirteen year old threads no longer relevant.

I wan't to keep products displayed after a customer has bought the last one. Currently I can have the store still show the products that are out of stock but I have to manually go in and set a product back to 'Active' status after the fact but I'm hopeful for a simple solution. I don't want to do away with the system for obvious reasons, just do away with the automated inactive switch... if that makes sense.

Any ideas?

Share this post


Link to post
Share on other sites

@Cyperis Hi Clint,

Unfortunately you have to modify <<checkout_process.php>>.  Find the following 3 lines of code and comment them out completely:

        if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) {
          tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
        }

And you'll get the result you'd like to achieve.

Cheers, Eddy

Edited by Moxamint

Share this post


Link to post
Share on other sites

@Moxamint Thanks Eddy, that was quick and worked perfect.

 

Edited by Cyperis

Share this post


Link to post
Share on other sites

The block of code to turn off a products status only kicks in if stock is less than 1 AND stock_allow_checkout is set to false. 

Therefore you might get the results you need just setting stock_allow_checkout to true ....

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0