Page 1 of 1
When item goes to 0 stock status changes
Posted: Wed Apr 27, 2022 5:03 pm
by lambro28
Using v1.0.8.0 and every time we sell the last one of a product, it changes the status to X so customers are no longer able to see it. How do I stop this from happening, so customers can still see the product.
Re: When item goes to 0 stock status changes
Posted: Thu Apr 28, 2022 9:45 am
by mhsuffolk
If you still want to take orders for the item,
In your admin. Configuration >> Stock. Change "Allow Checkout" to true
https://github.com/CE-PhoenixCart/Phoen ... _stock.php
Re: When item goes to 0 stock status changes
Posted: Thu Apr 28, 2022 10:03 am
by heatherbell
lambro28 wrote: ↑Wed Apr 27, 2022 5:03 pm
Using v1.0.8.0 and every time we sell the last one of a product, it changes the status to X so customers are no longer able to see it.
Just tested this behaviour on a new default install and it does not do that, the product status remains as In Stock and admin>Stock - Check stock level, Subtract stock and Allow checkout are all set to true by default.
I don't know if this default behaviour has changed since 1.0.8.0 but I don't think so.
Re: When item goes to 0 stock status changes
Posted: Fri Apr 29, 2022 10:27 pm
by lambro28
heatherbell wrote: ↑Thu Apr 28, 2022 10:03 am
lambro28 wrote: ↑Wed Apr 27, 2022 5:03 pm
Using v1.0.8.0 and every time we sell the last one of a product, it changes the status to X so customers are no longer able to see it.
Just tested this behaviour on a new default install and it does not do that, the product status remains as In Stock and admin>Stock - Check stock level, Subtract stock and Allow checkout are all set to true by default.
I don't know if this default behaviour has changed since 1.0.8.0 but I don't think so.
Thanks Heather, it is not a fresh V1.0.8.0, it has been updated with the official updates as they have been done. I think I started with Pheonix around 1.04...... and carried on from there.
Any one have an idea where I would look.
I have been told oscommerce used to do this, so maybe some old code left in from a much earlier phoenix version?
Re: When item goes to 0 stock status changes
Posted: Wed May 04, 2022 8:29 am
by Kofod95
https://github.com/CE-PhoenixCart/Phoen ... ck.php#L36
I think here.
You could probably overwrite it.
You could probably also make a hook or a module at checkout_success that makes sure all bought products are given a products_status of '1'.
//Daniel