When item goes to 0 stock status changes
When item goes to 0 stock status changes
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.
- mhsuffolk
- VIP Member
- Posts: 148
- Joined: Sat Oct 26, 2019 9:13 am
- Has thanked: 8 times
- Been thanked: 5 times
Re: When item goes to 0 stock status changes
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
In your admin. Configuration >> Stock. Change "Allow Checkout" to true
https://github.com/CE-PhoenixCart/Phoen ... _stock.php
Last edited by ecartz on Thu Apr 28, 2022 11:25 am, edited 1 time in total.
Reason: Check Stock does not affect product_status, just Allow Checkout and Subtract Stock.
Reason: Check Stock does not affect product_status, just Allow Checkout and Subtract Stock.
Live shop Phoenix 1.0.9.0 on PHP 8.0
-
- VIP Member
- Posts: 2025
- Joined: Mon Oct 07, 2019 4:39 am
- : Buy Me A Beverage
- Has thanked: 28 times
- Been thanked: 187 times
Re: When item goes to 0 stock status changes
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
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.heatherbell wrote: ↑Thu Apr 28, 2022 10:03 amJust 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.
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?
- Kofod95
- VIP Member
- Posts: 612
- Joined: Sat Feb 06, 2021 7:38 pm
- Has thanked: 80 times
- Been thanked: 142 times
Re: When item goes to 0 stock status changes
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
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
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Here are a lot of corns: Phoenix user guide