Zen Cart Logo
Forums / General Questions / Subtraction and update

Subtraction and update

Views: 800

Results 1 to 7 of 7
23 Jun 2023, 11:25 PM
#1
bruce1952 avatar

bruce1952

Totally Zenned

Join Date:
Aug 2008
Location:
Sydney Australia
Posts:
828
Plugin Contributions:
0

Subtraction and update

Hi all,

I have noticed something on my website and not sure that it is an error in the database or some files. I am using version 1.55 zencart and I am presently updating stock on the website and this is what I am doing.

I am adding stock to:

Product Qty Maximum:

I am also adding stock to:

Products Quantity:

I would assume that when product quantity drops in valve the product qty maximum would drop as well or am I incorrect?

What I am wanting is for the maximum quantity is to match the stock quantity, especially when stock is sold, if that makes any sense.

Any help would be appreciated.

24 Jun 2023, 4:50 AM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,711
Plugin Contributions:
56

Re: Subtraction and update

Just leave Product Qty Maximum at 0 and set the stock management values as follows:

In Admin > Configuration > Stock

Check stock level = true
Subtract stock = true
Allow Checkout = false

see configuration 3 in
https://docs.zen-cart.com/user/running/stock/

This prevents people from being able to buy more than are currently in stock (Products Quantity).

24 Jun 2023, 7:21 AM
#4
bruce1952 avatar

bruce1952

Totally Zenned

Join Date:
Aug 2008
Location:
Sydney Australia
Posts:
828
Plugin Contributions:
0

Re: Subtraction and update

[QUOTE=swguy;1395640]Just leave Product Qty Maximum at 0 and set the stock management values as follows:

In Admin > Configuration > Stock

Check stock level = true
Subtract stock = true
Allow Checkout = false

see configuration 3 in
https://docs.zen-cart.com/user/running/stock/

Thank you I will try that.

24 Jun 2023, 7:51 AM
#5
bruce1952 avatar

bruce1952

Totally Zenned

Join Date:
Aug 2008
Location:
Sydney Australia
Posts:
828
Plugin Contributions:
0

Re: Subtraction and update

Hi Swguy,

Have tried your suggestion but it is not working how I want to because I am selling stock that I don't have at the time of some orders.

I have set all settings to true in order to sell the stock.

I have set on quite a few products the max qty (which is the stock that I Have) because I only want that quantity to be the max that they can purchase.

The qty that I have I am putting into Products quantity.

What I am trying to do is to get both to work together so that when a product is purchased it reduces the max quantity as well so the customer can see it.

Once I get this sorted out I will change the max quantity displayed on the site to stock available.

I hope you can understand what I and try to get done.

24 Jun 2023, 9:22 AM
#6
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
395
Plugin Contributions:
6

Re: Subtraction and update

Bruce1952:

Hi Swguy,

Have tried your suggestion but it is not working how I want to because I am selling stock that I don't have at the time of some orders.

I have set all settings to true in order to sell the stock.

I have set on quite a few products the max qty (which is the stock that I Have) because I only want that quantity to be the max that they can purchase.

The qty that I have I am putting into Products quantity.

What I am trying to do is to get both to work together so that when a product is purchased it reduces the max quantity as well so the customer can see it.

Once I get this sorted out I will change the max quantity displayed on the site to stock available.

I hope you can understand what I and try to get done.

Hi,
I think I understand... You want to display product quantity so that customers know how many are available and don't try to order more.
Then you should set as swguy told you and check that the setting to display product quantity is 'on' in Catalog > Product type > Click on 'Product - General' > set 'Show Quantity in Stock' to on (1 or true).
I think it is the closest to what you want, more than that will require some code modification.

24 Jun 2023, 11:17 AM
#7
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,711
Plugin Contributions:
56

Re: Subtraction and update

I have set all settings to true in order to sell the stock.

You want "Allow checkout" to be false so that people can't checkout with more in their cart than is currently in stock.

Also @pilou2's suggestion is a solid way to re-enforce that message.