#increment/ decrement stock or inventory

7 messages · Page 1 of 1 (latest)

white terrace
#

is there any updates on how can i increment a specific attribute; i have a list of products and i have a stock/quantity attribut; how can i update it after each order for each product in that order

faint oak
white terrace
#

ok i'll be waiting for this, thank you

glossy bough
white terrace
#

can you show a simple example of how can i do so; or is their any links i can refer to ?

crude hollow
#

I don't think there are any direct examples of doing this but it shouldn't be hard.

Create a function (you can have this trigger on when a new order is put/deleted in the database)
Pull the current stock count
Increment it by one
save the new stock count

faint oak