Almacenar la fecha prevista de entrega en un campo aparte (quitarlo de observaciones)

git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_WebOSC/trunk/src@6 15ff7747-3a15-8b43-b76a-1f22d5625af6
This commit is contained in:
David Arranz 2007-08-30 10:11:11 +00:00
parent 8a024a86c0
commit 9031e26799
20 changed files with 129 additions and 8 deletions

View File

@ -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 @@
<td class="main"><?php echo '<b>' . TEXT_ORDER_NUMBER . '</b> ' . $history['orders_id']; ?></td>
<td class="main"><?php echo '<b>' . TEXT_ORDER_DATE . '</b> ' . tep_date_long($history['date_purchased']) ?> </td>
<td class="main"><?php echo '<b>' . TEXT_ORDER_PRODUCTS . '</b> ' . $products['count'] ?> </td>
<td class="main"><?php echo '<b>' . TEXT_REF_CLIENTE . '</b> ' . $history['referencia_cliente']; ?></td>
<td class="main"><?php echo '<b>' . TEXT_ORDER_STATUS . '</b> ' . $history['orders_status_name']; ?></td>
<td class="main" width="20%" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'order_id=' . $history['orders_id'], 'SSL') . '">' . Ver /*tep_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW)*/ . '</a>'; ?></td>
</tr>

View File

@ -109,13 +109,24 @@
if (tep_not_null($order->delivery['shipdate'])){
?>
<tr>
<td class="main"><b><?php echo HEADING_ARRIVAL_DATE; ?></b></td>
<td class="main"><br/><b><?php echo HEADING_ARRIVAL_DATE; ?></b></td>
</tr>
<tr>
<td class="main"><?php echo strftime("%A, %d de %B de %Y",$order->delivery['shipdate']); ?></td>
</tr>
<?php
}
if (tep_not_null($order->info['referencia_cliente'])){
?>
<tr>
<td class="main"><br/><b><?php echo HEADING_REFERENCIA_CLIENTE; ?></b></td>
</tr>
<tr>
<td class="main"><?php echo $order->info['referencia_cliente']; ?></td>
</tr>
<?php
}
// End Rodax Software
?>
</table></td>

View File

@ -26,4 +26,8 @@ define('TEXT_INFO_HEADING_DELETE_ORDERS_STATUS', 'Delete Orders Status');
define('ERROR_REMOVE_DEFAULT_ORDER_STATUS', 'Error: The default order status can not be removed. Please set another order status as default, and try again.');
define('ERROR_STATUS_USED_IN_ORDERS', 'Error: This order status is currently used in orders.');
define('ERROR_STATUS_USED_IN_HISTORY', 'Error: This order status is currently used in the order status history.');
// Begin Rodax Software
define('TEXT_REF_CLIENTE', 'Ref. cliente:');
// End Rodax Software
?>

View File

@ -26,4 +26,8 @@ define('TEXT_INFO_HEADING_DELETE_ORDERS_STATUS', 'Eliminar Estado Pedido');
define('ERROR_REMOVE_DEFAULT_ORDER_STATUS', 'Error: El estado de pedido por defecto no se puede eliminar. Establezca otro estado de pedido predeterminado y pruebe de nuevo.');
define('ERROR_STATUS_USED_IN_ORDERS', 'Error: Este estado de pedido esta siendo usado actualmente.');
define('ERROR_STATUS_USED_IN_HISTORY', 'Error: Este estado de pedido se esta usando en algun hist&oacute;rico de algun pedido.');
// Begin Rodax Software
define('TEXT_REF_CLIENTE', 'Ref. cliente:');
// End Rodax Software
?>

View File

@ -26,4 +26,8 @@ define('TEXT_INFO_HEADING_DELETE_ORDERS_STATUS', 'Bestellstatus l&ouml;schen');
define('ERROR_REMOVE_DEFAULT_ORDER_STATUS', 'Fehler: Der Standard-Bestellstatus kann nicht gel&ouml;scht werden. Bitte definieren Sie einen neuen Standard-Bestellstatus und wiederholen Sie den Vorgang.');
define('ERROR_STATUS_USED_IN_ORDERS', 'Fehler: Dieser Bestellstatus wird zur Zeit noch bei den Bestellungen verwendet.');
define('ERROR_STATUS_USED_IN_HISTORY', 'Fehler: Dieser Bestellstatus wird zur Zeit noch in der Bestellhistorie verwendet.');
// Begin Rodax Software
define('TEXT_REF_CLIENTE', 'Ref. cliente:');
// End Rodax Software
?>

View File

@ -33,6 +33,8 @@
$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
$status = tep_db_prepare_input($HTTP_POST_VARS['status']);
$comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
//$referencia_cliente = tep_db_prepare_input($HTTP_POST_VARS['referencia_cliente']);
$order_updated = false;
$check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");
@ -55,7 +57,7 @@
$customer_notified = '1';
}
tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments) . "')");
tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments, rdx_referencia_cliente) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments) . "', '" . tep_db_input($referencia_cliente) . "')");
$order_updated = true;
}

View File

@ -49,6 +49,12 @@
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'error=expired_arrival_date', 'SSL')); //ERR MSG ON NEXT PAGE
}
}
// Referencia de cliente
if (!tep_session_is_registered('referencia_cliente')) tep_session_register('referencia_cliente');
if (tep_not_null($HTTP_POST_VARS['referencia_cliente'])) {
$referencia_cliente = tep_db_prepare_input($HTTP_POST_VARS['referencia_cliente']);
}
// End Rodax Software
if (!tep_session_is_registered('payment')) tep_session_register('payment');
@ -56,7 +62,7 @@
if (!tep_session_is_registered('comments')) tep_session_register('comments');
if (tep_not_null($HTTP_POST_VARS['comments'])) {
$comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
$comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
}
// load the selected payment module
@ -161,12 +167,13 @@
<tr>
<td class="main"><?php //Rodax Software echo $order->info['shipping_method']; ?></td>
</tr>
<?php
// Begin Rodax Software
if (tep_not_null($order->delivery['shipdate'])){
?>
<tr>
<td class="main"><b><?php echo HEADING_ARRIVAL_DATE . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
<td class="main"><br/><b><?php echo HEADING_ARRIVAL_DATE . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
</tr>
<tr>
<td class="main"><?php echo strftime("%A, %d de %B de %Y",$order->delivery['shipdate']); ?></td>
@ -174,8 +181,28 @@
<?php
}
// End Rodax Software
}
?>
<?php
// Begin Rodax Software
if (tep_not_null($order->info['referencia_cliente'])) {
?>
<tr>
<td class="main"><br/><b><?php echo HEADING_REFERENCIA_CLIENTE . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
</tr>
<tr>
<td class="main"><?php echo $order->info['referencia_cliente']; ?></td>
</tr>
<?php
}
// End Rodax Software
}
?>
</table></td>
<?php
}

View File

@ -107,6 +107,7 @@ if (isset($_SESSION['shipdate'])) {
'orders_status' => $order->info['order_status'],
'currency' => $order->info['currency'],
'rdx_ship_date' => $_SESSION['shipdate'],
'rdx_referencia_cliente' => $_SESSION['referencia_cliente'],
'currency_value' => $order->info['currency_value']);
tep_db_perform(TABLE_ORDERS, $sql_data_array);
$insert_id = tep_db_insert_id();
@ -265,11 +266,19 @@ if (isset($_SESSION['shipdate'])) {
tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
// Begin Rodax Software
// shipdate
if(isset($_SESSION["shipdate"])) {
$email_order.="\n" . EMAIL_TEXT_ARRIVAL_DATE . "\n" .
EMAIL_SEPARATOR . "\n" .
strftime("%A, %d de %B de %Y",$_SESSION["shipdate"]) . "\n\n";
}
// referencia de cliente
if(isset($_SESSION["referencia_cliente"])) {
$email_order.="\n" . EMAIL_TEXT_REFERENCIA_CLIENTE . "\n" .
EMAIL_SEPARATOR . "\n" . $_SESSION["referencia_cliente"] . "\n\n";
}
// End Rodax Software
}
@ -306,6 +315,7 @@ if (isset($_SESSION['shipdate'])) {
tep_session_unregister('comments');
// Begin Rodax Software
tep_session_unregister('shipdate'); // shipdate
tep_session_unregister('referencia_cliente'); // referencia de cliente
// End Rodax Software

View File

@ -104,7 +104,7 @@
unset($_GET['date']);
}
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
}
}
// End Rodax Software
// process the selected shipping method
@ -114,6 +114,12 @@
$comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
}
// Referencia de cliente
if (!tep_session_is_registered('referencia_cliente')) tep_session_register('referencia_cliente');
if (tep_not_null($HTTP_POST_VARS['referencia_cliente'])) {
$referencia_cliente = tep_db_prepare_input($HTTP_POST_VARS['referencia_cliente']);
}
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
if ( (tep_count_shipping_modules() > 0) || ($free_shipping == true) ) {
@ -499,6 +505,37 @@ if(isset($_GET['date'])){
<?php
}
?>
<?php // Begin Rodax Software
// Referencia de cliente
?>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="main" width="50%"><b><?php echo TABLE_HEADING_REFERENCIA_CLIENTE;?>:</b></td>
</tr>
</table></td>
</tr>
<tr>
<td>
<table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="50%"><?php echo tep_draw_input_field('referencia_cliente', '',' size="50" '); ?></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php // End Rodax Software ?>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>

View File

@ -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'] : ''));

View File

@ -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
?>

View File

@ -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
?>

View File

@ -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
?>

View File

@ -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
?>

View File

@ -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&uacute;n.');
// Begin Rodax Software
define('TEXT_REF_CLIENTE', 'Ref. cliente:');
// End Rodax Software
?>

View File

@ -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
?>

View File

@ -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

View File

@ -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
?>

View File

@ -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&auml;tigt.');
// Begin Rodax Software
define('TEXT_REF_CLIENTE', 'Ref. cliente:');
// End Rodax Software
?>

View File

@ -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)
);