'check-available-stock' fix issue #533 and #526

if 'check-available-stock' is set to 0
the quantity returned is 9999