/** * sendEmail */ public function sendEmail() { require_once 'models/common/common_email.php'; $CommonEmail = new common_email(); require_once 'models/ecommerce/ecommerce_order.php'; $ecommerce_order_conf = ecommerce_order::initConfiguration(); //admin_email_name $template = 'return'; $content = $this->getResultHtml(); $email_recipient = $ecommerce_order_conf['product_returns_mail_to_address']; $name_recipient = $ecommerce_order_conf['product_returns_mail_to_name']; $email_from = $_SESSION['client']['customer']['email']; $name_from = "{$_SESSION['client']['customer']['first_name']} {$_SESSION['client']['customer']['last_name']}"; if ($CommonEmail->sendEmail($template, $content, $email_recipient, $name_recipient, $email_from, $name_from)) { return true; } else { return false; } }
/** * Return true if delivery to given country is VAT eligible * * @param int $country_id Country Id to check EU status * @return boolean */ function isVatEligibleByCountry($country_id) { $order_conf = ecommerce_order::initConfiguration(); $exclude_vat = false; require_once 'models/international/international_country.php'; if (is_numeric($country_id)) { $Country = new international_country(); $country_data = $Country->detail($country_id); $exclude_vat = $order_conf['non_eu_zero_vat'] && !$country_data['eu_status']; } return !$exclude_vat; }