CMXX - First testing

This commit is contained in:
“VeLiTi”
2025-03-07 15:07:15 +01:00
parent 5dd2973a26
commit cd0e04981c
81 changed files with 697 additions and 325 deletions

View File

@@ -151,7 +151,7 @@ function send_order_details_email($email, $products, $first_name, $last_name, $a
return;
}
$subject = $subject_new_order;
$headers = 'From: ' . mail_from . "\r\n" . 'Reply-To: ' . mail_from . "\r\n" . 'Return-Path: ' . mail_from . "\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . 'MIME-Version: 1.0' . "\r\n" . 'Content-Type: text/html; charset=UTF-8' . "\r\n";
//$headers = 'From: ' . mail_from . "\r\n" . 'Reply-To: ' . mail_from . "\r\n" . 'Return-Path: ' . mail_from . "\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . 'MIME-Version: 1.0' . "\r\n" . 'Content-Type: text/html; charset=UTF-8' . "\r\n";
ob_start();
include './custom/email/order-details-template.php';
$order_details_template = ob_get_clean();
@@ -163,7 +163,7 @@ function send_product_notification_email($email,$product_details){
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
$subject = $subject_out_of_stock.' - '.$product_details;
$headers = 'From: ' . mail_from . "\r\n" . 'Reply-To: ' . $email . "\r\n" . 'Return-Path: ' . mail_from . "\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . 'MIME-Version: 1.0' . "\r\n" . 'Content-Type: text/html; charset=UTF-8' . "\r\n";
//$headers = 'From: ' . mail_from . "\r\n" . 'Reply-To: ' . $email . "\r\n" . 'Return-Path: ' . mail_from . "\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . 'MIME-Version: 1.0' . "\r\n" . 'Content-Type: text/html; charset=UTF-8' . "\r\n";
$message = $product_details.' are out of stock. Please notify '.$email.' when available';
//mail(email, $subject, $message, $headers);
@@ -472,10 +472,10 @@ function removeGiftCart($pdo, $orderID){
}
}
function generateInvoice($invoice,$orderID){
function generateInvoice($invoice_cust,$orderID,$user_language){
//Variables
$customer_email = htmlspecialchars($invoice['customer']['email'] ?? '', ENT_QUOTES);
$customer_email = htmlspecialchars($invoice_cust['customer']['email'] ?? '', ENT_QUOTES);
//Generate invoice
ob_start();
include dirname(__FILE__).'/custom/email/order-invoice-template.php';