inbloombr Posted August 19, 2012 Share Posted August 19, 2012 Pessoal, se alguém já sabia, ou já tinha postado. Peço desculpas, mas não achei na busca. Arquivo para não enviar faturas de produtos grátis com 0.00 Salve com o nome que desejar em includes/hooks <?php function disable_00_invoices($vars) { $email_template_name = $vars['messagename']; # Email template name being sent $relid = $vars['relid']; # Related ID it's being sent for - client ID, invoice ID, etc... //Checking for certain template name, if so - this is our case if ($email_template_name == "Invoice Created" || $email_template_name == "Invoice Payment Confirmation") { //getting total of the invoice $result = select_query('tblinvoices', 'total', array("id" => $relid)); $data = mysql_fetch_assoc($result); //if it is equal to '0.00' we disable email sending if (isset($data['total']) && $data['total'] == '0.00') $merge_fields['abortsend'] = true; } return $merge_fields; } add_hook("EmailPreSend",1,"disable_00_invoices"); ?> Abxx fonte: http://www.whmcsjet.com/how-to-disable-invoice-generation-for-0-00-invoices/ :P Link to comment Share on other sites More sharing options...
Murilo H Posted August 19, 2012 Share Posted August 19, 2012 certo dentro do includes/hooks tem arquivo php chamado exemple é para adicionar dentro dele ou criar novo arquivo? Link to comment Share on other sites More sharing options...
Roots Posted August 19, 2012 Share Posted August 19, 2012 certo dentro do includes/hooks tem arquivo php chamado exemple é para adicionar dentro dele ou criar novo arquivo? Criar novo arquivo, observe q ele diz: Arquivo para não enviar faturas de produtos grátis com 0.00 Salve com o nome que desejar em includes/hooks Boa sorte! Link to comment Share on other sites More sharing options...
Murilo H Posted August 19, 2012 Share Posted August 19, 2012 Criar novo arquivo, observe q ele diz: Boa sorte! Obrigado Link to comment Share on other sites More sharing options...
Recommended Posts