diff --git a/cart.php b/cart.php index a1a6f63..562dee1 100644 --- a/cart.php +++ b/cart.php @@ -101,7 +101,7 @@ foreach ($products_in_cart as $num => $product) { $subtotal += (float)$product['options_price'] * (int)$product['quantity']; } -template_header('Shopping Cart'); +template_header(($shopping_cart_header ?? 'Shopping Cart')); $view = '
=$order_email_message_2?>
Order: =$order_id?>
-Date:
=$order_number_text ?? 'Order' ?>: =$order_id?>
+=$order_date_text ?? 'Date'?>:
| =$tr_product?> | -Opties | -=$tr_quantity?> | -=$tr_price?> | +=$tr_product ?? 'Product' ?> | +=$tr_options ?? 'Options' ?> | +=$tr_quantity ?? 'Quantity'?> | +=$tr_price ?? 'Price' ?> | =$tr_total?> |
| =$product['meta']['name']?> | +=${$product['meta']['name']} ?? $product['meta']['name']?> | =implode(", ", $product['options'])?> | =$product['quantity']?> | =currency_code?>=number_format($product['options_price'],2)?> | diff --git a/custom/email/order-invoice-template.php b/custom/email/order-invoice-template.php index 7f3c952..5c9f20f 100644 --- a/custom/email/order-invoice-template.php +++ b/custom/email/order-invoice-template.php @@ -3,7 +3,7 @@ //(defined(security_key) or defined('admin')) or exit; ?> =template_order_email_header()?> - +||||
Invoice: =$invoice_cust['invoice']['id']?> |
- Date: |
+ =$order_invoice_text ?? 'Invoice'?>: =$invoice_cust['invoice']['id']?> |
+ =$order_date_text ?? 'Date'?>: |
| =$tr_product?> | -Options | -=$tr_quantity?> | -=$tr_price?> | +=$tr_product ?? 'Product' ?> | +=$tr_options ?? 'Options' ?> | +=$tr_quantity ?? 'Quantity'?> | +=$tr_price ?? 'Price' ?> | =$tr_total?> |
| =$tr_product?> | -Options | -=$tr_quantity?> | -=$tr_price?> | +=$tr_product ?? 'Product' ?> | +=$tr_options ?? 'Options' ?> | +=$tr_quantity ?? 'Quantity'?> | +=$tr_price ?? 'Price' ?> | =$tr_total?> |
| =$product['meta']['name']?> | +=${$product['product_name']} ?? $product['product_name']?> | =implode(", ", $product['options'])?> | =$product['quantity']?> | =currency_code?>=number_format($product['options_price'],2)?> | diff --git a/functions.php b/functions.php index a513784..985b042 100644 --- a/functions.php +++ b/functions.php @@ -136,7 +136,7 @@ function populate_categories($categories, $selected = 0, $parent_id = 0, $n = 0) // Send order details email function function send_order_details_email($email, $products, $first_name, $last_name, $address_street, $address_city, $address_state, $address_zip, $address_country, $subtotal, $discounttotal,$shippingtotal,$taxtotal,$total, $order_id) { - include './custom/translations/translations_'.strtoupper(language_code).'.php'; + include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php'; // Send payment notification to webmaster $address_name = htmlspecialchars($first_name ?? '', ENT_QUOTES).' '.htmlspecialchars($last_name ?? '', ENT_QUOTES); if (email_notifications) { @@ -160,7 +160,7 @@ function send_order_details_email($email, $products, $first_name, $last_name, $a //Send email to administrator for out of stock notification // only for registered users function send_product_notification_email($email,$product_details){ - include './custom/translations/translations_'.strtoupper(language_code).'.php'; + 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"; @@ -316,7 +316,7 @@ function format_bytes($bytes) { function getAccessoiries($clientsecret, $categoryID){ - include './custom/translations/translations_'.strtoupper(language_code).'.php'; + include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php'; //GET CATALOG DATA $additional_products = ioAPIv2('/v2/catalog/category='.$categoryID,'',$clientsecret); @@ -366,7 +366,7 @@ function getAccessoiries($clientsecret, $categoryID){ function getSamples($clientsecret, $categoryID){ - include './custom/translations/translations_'.strtoupper(language_code).'.php'; + include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php'; //GET CATALOG DATA $additional_products = ioAPIv2('/v2/catalog/category='.$categoryID,'',$clientsecret); @@ -522,7 +522,7 @@ function generateInvoice($invoice,$orderID){ function freeShipment($price, $type){ - include './custom/translations/translations_'.strtoupper(language_code).'.php'; + include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php'; //Free delivery indicator $delivery_status = ($price >= free_shipment_price) ? $free_delivery : $non_free_delivery.currency_code.free_shipment_price.',-'; @@ -538,7 +538,7 @@ function freeShipment($price, $type){ function consent() { - include './custom/translations/translations_'.strtoupper(language_code).'.php'; + include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php'; $age_consent = '