Updated logic for updating total product stock