Well selection of button is already happening based on if product quantity is >0
having said that no further if/else is required
i will have a look for you in the morning, and write some exact code and where to insert it.