If you want the cash drawer to open every time you print a receipt, add the cash drawer codes to the Header section on the receipt template
Otherwise, create a Rule to execute the Cash Drawer print job on Payment Received. Don't forget to change your Cash Drawer template to Auto Print After -> Manual, or it will open again when you click close.