Hello,
I have the current code for sending an email when a company is noted in create and account,
if ( ACCOUNT_COMPANY == 'true' && tep_not_null($company_tax_id) ) {
$alert_email_text = "Please note that " . $firstname . " " . $lastname . " of the company: " . $company . " has created an account.";
tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, 'Company account created', $alert_email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
} else {
$email_text_coupon .= EMAIL_WELCOME . EMAIL_TEXT_COUPON . EMAIL_CONTACT. EMAIL_WARNING;
tep_mail($name, $email_address, EMAIL_SUBJECT_COUPON, $email_text_coupon, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
I am finding most shops do not enter the tax id box, so all emails send out. How do I change so if only the company name is used the above will work correctly and $email_test_coupon is not sent if company is set. I tried if ( ACCOUNT_COMPANY == 'true') { and if ( ACCOUNT_COMPANY == 'true' or tep_not_null($company_tax_id) ) {.
Neither seemed to work, both ended up sending $email_test_coupon.
Thanks JR