Hi,
This code is fine but where to add it in that view file depends on where you want the message to appear on the product details page.
Since you want it before the add to cart button area, you could add it just before the code:
?>
<div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main"><?php
Also, note that this code supposes your products don't have variants.
If they do, it requires more complex coding to handle the refresh of the information when the selected variant is changed etc.
Please understand that this is a user support forum, to answer your questions. We can't do custom coding for you as part of that service. If you want us to work on such tasks for you, it's possible but as an extra. In that case, you can request a quote on the job via our contact form:
www.hikashop.com/support/contact-us.html
Make sure you provide precise information on the job when contacting us so that we have the necessary information to reply to you.