Hi,
Ok, I found the problem. I mistook the contact code with the waitlist code.
You actually had to change the line:
if(hikashop_level(1) && ($waitlist==2 || ($waitlist==1 && !empty($this->element->product_waitlist)))){ ?>
to:
if(hikashop_level(1) && ($waitlist==2 || ($waitlist==1 && !empty($this->element->main->product_waitlist)))){ ?>
in the file "quantity" of the "product" view via the menu Display->Views in order to make it work.
It's working now.
Also, you should disable your website cache as it won't work properly otherwise.
Since the whole pages are cached, suppose that someone buys the latest item of a product. The next users will still see the add to cart button but it won't work as there is no quantity left up until the cache of the page expires and that it display the add to cart button but the waitlist button.