Jump to content

Stock Management: Decrease All Combinations Quantities Along With The Selected Combination


octagonal elf

Recommended Posts

Hello all. For example if I have three combinations below with each 1 item left in stock, and the buyer selected combination A, the quantity for A will be reduced to 0 after the purchase. Any idea from where I could makes changes so that all combinations from that product to be decreased following Combination A? Thanks and appreciate.

 

Stock Status Before Purchase

Combination A, Quantity:1

Combination B, Quantity:1

Combination C, Quantity:1

 

Stock Status After Purchase

Combination A, Quantity:0

Combination B, Quantity:1

Combination C, Quantity:1

 

How do I modify so that all combinations decrease by 1, so that all becomes 0?

Combination A, Quantity:0

Combination B, Quantity:0

Combination C, Quantity:0

 

Note: I am thinking perhaps I could do a "update ps_stock_available set quantity=0 where  id_product=1" but I wonder which file to do the modification?

Edited by octagonal elf (see edit history)
Link to comment
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
×
×
  • Create New...