diff --git a/catalog/account_history.php b/catalog/account_history.php
index 70a03f5..0c53a69 100644
--- a/catalog/account_history.php
+++ b/catalog/account_history.php
@@ -62,7 +62,7 @@
$orders_total = tep_count_customer_orders();
if ($orders_total > 0) {
- $history_query_raw = "select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by orders_id DESC";
+ $history_query_raw = "select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total, o.rdx_referencia_cliente as referencia_cliente, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by orders_id DESC";
$history_split = new splitPageResults($history_query_raw, MAX_DISPLAY_ORDER_HISTORY);
$history_query = tep_db_query($history_split->sql_query);
$i = 0;
@@ -90,6 +90,7 @@
diff --git a/catalog/includes/classes/order.php b/catalog/includes/classes/order.php
index 0686020..7818d49 100644
--- a/catalog/includes/classes/order.php
+++ b/catalog/includes/classes/order.php
@@ -32,7 +32,7 @@
$order_id = tep_db_prepare_input($order_id);
- $order_query = tep_db_query("select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_telephone, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified, rdx_ship_date from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
+ $order_query = tep_db_query("select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_telephone, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified, rdx_ship_date, rdx_referencia_cliente from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
$order = tep_db_fetch_array($order_query);
$totals_query = tep_db_query("select title, text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' order by sort_order");
@@ -60,6 +60,7 @@
'date_purchased' => $order['date_purchased'],
'orders_status' => $order_status['orders_status_name'],
'last_modified' => $order['last_modified'],
+ 'referencia_cliente' => $order['rdx_referencia_cliente'],
'total' => strip_tags($order_total['text']),
'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title'])));
@@ -161,6 +162,7 @@
'shipping_cost' => $shipping['cost'],
'subtotal' => 0,
'tax' => 0,
+ 'referencia_cliente' => $_SESSION['referencia_cliente'], //Rodax Software
'tax_groups' => array(),
'comments' => (isset($GLOBALS['comments']) ? $GLOBALS['comments'] : ''));
diff --git a/catalog/includes/languages/english/account_history.php b/catalog/includes/languages/english/account_history.php
index 675722b..2f380dd 100644
--- a/catalog/includes/languages/english/account_history.php
+++ b/catalog/includes/languages/english/account_history.php
@@ -25,4 +25,8 @@ define('TEXT_ORDER_COST', 'Order Cost:');
define('TEXT_VIEW_ORDER', 'View Order');
define('TEXT_NO_PURCHASES', 'You have not yet made any purchases.');
+
+// Begin Rodax Software
+define('TEXT_REF_CLIENTE', 'Ref. cliente:');
+// End Rodax Software
?>
diff --git a/catalog/includes/languages/english/account_history_info.php b/catalog/includes/languages/english/account_history_info.php
index 0755017..890820a 100644
--- a/catalog/includes/languages/english/account_history_info.php
+++ b/catalog/includes/languages/english/account_history_info.php
@@ -41,5 +41,6 @@ define('HEADING_DOWNLOAD', 'Download links');
// Begin Rodax Software
define('HEADING_ARRIVAL_DATE','Shipment Arrival Date');
+define('HEADING_REFERENCIA_CLIENTE','Referencia de su cliente');
// End Rodax Software
?>
diff --git a/catalog/includes/languages/english/checkout_confirmation.php b/catalog/includes/languages/english/checkout_confirmation.php
index 7820dbf..42fc716 100644
--- a/catalog/includes/languages/english/checkout_confirmation.php
+++ b/catalog/includes/languages/english/checkout_confirmation.php
@@ -30,5 +30,6 @@ define('TEXT_EDIT', 'Edit');
// Begin Rodax Software
define('HEADING_ARRIVAL_DATE','Arrival Date');
+define('HEADING_REFERENCIA_CLIENTE','Referencia de su cliente');
// End Rodax Software
?>
diff --git a/catalog/includes/languages/english/checkout_shipping.php b/catalog/includes/languages/english/checkout_shipping.php
index 636e45d..003243f 100644
--- a/catalog/includes/languages/english/checkout_shipping.php
+++ b/catalog/includes/languages/english/checkout_shipping.php
@@ -36,5 +36,6 @@ define('ERROR_HEADING','Error');
define('ERROR_EXPIRED_ARRIVAL_DATE','Your selected arrival date is no longer valid. Please select another.');
define('ERROR_NO_ARRIVAL_DATE','Please select a date for your shipment to arrive on.');
define('ERROR_NO_SHIPMENT_METHOD','Please select a shipment method.');
+define('TABLE_HEADING_REFERENCIA_CLIENTE', 'Referencia de su cliente (opcional)');
// End Rodax Software
?>
diff --git a/catalog/includes/languages/espanol/account_history.php b/catalog/includes/languages/espanol/account_history.php
index 3e9a187..9a73328 100644
--- a/catalog/includes/languages/espanol/account_history.php
+++ b/catalog/includes/languages/espanol/account_history.php
@@ -25,4 +25,8 @@ define('TEXT_ORDER_COST', 'Precio:');
define('TEXT_VIEW_ORDER', 'Ver pedido');
define('TEXT_NO_PURCHASES', 'No ha realizado ningun pedido aún.');
+
+// Begin Rodax Software
+define('TEXT_REF_CLIENTE', 'Ref. cliente:');
+// End Rodax Software
?>
diff --git a/catalog/includes/languages/espanol/account_history_info.php b/catalog/includes/languages/espanol/account_history_info.php
index 2a98198..1c401f1 100644
--- a/catalog/includes/languages/espanol/account_history_info.php
+++ b/catalog/includes/languages/espanol/account_history_info.php
@@ -41,6 +41,7 @@ define('HEADING_DOWNLOAD', 'Descarga tus productos aqui');
// Begin Rodax Software
define('HEADING_ARRIVAL_DATE','Fecha de entrega prevista');
+define('HEADING_REFERENCIA_CLIENTE','Referencia de su cliente');
// End Rodax Software
?>
diff --git a/catalog/includes/languages/espanol/checkout_confirmation.php b/catalog/includes/languages/espanol/checkout_confirmation.php
index b14d38d..6866532 100644
--- a/catalog/includes/languages/espanol/checkout_confirmation.php
+++ b/catalog/includes/languages/espanol/checkout_confirmation.php
@@ -30,6 +30,7 @@ define('TEXT_EDIT', 'Cambiar');
// Begin Rodax Software
define('HEADING_ARRIVAL_DATE','Fecha de entrega prevista');
+define('HEADING_REFERENCIA_CLIENTE','Referencia de su cliente');
// End Rodax Software
diff --git a/catalog/includes/languages/espanol/checkout_shipping.php b/catalog/includes/languages/espanol/checkout_shipping.php
index 6a8a932..0272cda 100644
--- a/catalog/includes/languages/espanol/checkout_shipping.php
+++ b/catalog/includes/languages/espanol/checkout_shipping.php
@@ -38,6 +38,7 @@ define('ERROR_HEADING','Error');
define('ERROR_EXPIRED_ARRIVAL_DATE','La fecha de entrega no es válida. Por favor, ind&oicute;quela correctamente.');
define('ERROR_NO_ARRIVAL_DATE','Por favor, indique una fecha prevista de entrega.');
define('ERROR_NO_SHIPMENT_METHOD','Please select a shipment method.');
+define('TABLE_HEADING_REFERENCIA_CLIENTE', 'Referencia de su cliente (opcional)');
// End Rodax Software
?>
diff --git a/catalog/includes/languages/german/account_history.php b/catalog/includes/languages/german/account_history.php
index 6155b24..fdc91a5 100644
--- a/catalog/includes/languages/german/account_history.php
+++ b/catalog/includes/languages/german/account_history.php
@@ -25,4 +25,8 @@ define('TEXT_ORDER_COST', 'Summe:');
define('TEXT_VIEW_ORDER', 'Bestellung ansehen');
define('TEXT_NO_PURCHASES', 'Sie haben noch keine Bestellungen getätigt.');
+
+// Begin Rodax Software
+define('TEXT_REF_CLIENTE', 'Ref. cliente:');
+// End Rodax Software
?>
diff --git a/catalog/install/luisleon.sql b/catalog/install/luisleon.sql
index ebadc8b..ad0100a 100644
--- a/catalog/install/luisleon.sql
+++ b/catalog/install/luisleon.sql
@@ -316,6 +316,7 @@ CREATE TABLE orders (
currency_value decimal(14,6),
rdx_orders_id_local int,
rdx_ship_date varchar(10),
+ rdx_referencia_cliente varchar(255),
PRIMARY KEY (orders_id),
KEY IDX_ORDERS_ID_LOCAL (rdx_orders_id_local)
);
|