View Single Post
  #1  
Old 09-29-2007, 04:47 PM
 
mpcommercial mpcommercial is offline
 

Member
  
Join Date: Dec 2004
Posts: 28
 

Default Order tracking mod not working on version 4.1.8

Hello:

I had an custom order tracking mode on my x-cart 3.5.8 version store that worked really well: The customer would input their order id and shipping zipcode, and the query will give back the status of the order, and if shipped, the tracking number (you can view it at www.bohemia-style.com)

I am working on the huge task of uypgrading this store to 4.1.8. My nice order track mod, which save me so many emails and phone calls from customers wanting to know their order status, does not work anymore! I do not undestand why: the query is very simple, and the fields involved on the order table have not changed: orderid, status, tracking s_zipcode.

Here is my code for order_track.php:

<?
#
# $Id: order_track.php,v 1.35, based on order.php 1.14.2.1 2004/02/05 12:25:45 mclap Exp $
#

require "./auth.php";

require $xcart_dir."/include/categories.php";

#
# Security check if order owned by another customer
#

$query = "SELECT orderid, status, tracking FROM $sql_tbl[orders] WHERE orderid='$orderid' and s_zipcode='$zipcode' ORDER BY orderid";
$order_data = func_query($query);


// if ($order_data["userinfo"]["login"]!=$login) {
// func_header_location("error_message.php?access_den ied");
// }


$smarty->assign("orders", $order_data);
$smarty->assign("main","order_track");
$smarty->display("customer/home.tpl");
?>


Here is the code for order_track.tpl:

{* $Id: order_track.tpl,v 1.35 2003/11/12 10:26:28 svowl Exp $ *}
{capture name=dialog}

{if $smarty.get.mode ne "update"}

<p>{$lng.txt_track_order_form_header}</p>

<table width=100% border=0 cellspacing=0 cellpadding=2>
<form action="order_track.php?mode=update" method=post name=orderform>
<input type=hidden name=mode value="update">

<tr valign=middle>
<td class=FormButton>Order Number</td>
<td><font class=Star>*</font></td>
<td nowrap>
<input type=text name=orderid size=32 maxlength=32 value="">
</td>
</tr>

<tr valign=middle>
<td class=FormButton>Destination Zipcode</td>
<td><font class=Star>*</font></td>
<td nowrap>
<input type=text name=zipcode size=32 maxlength=32 value="">
</td>
</tr>

<tr valign=middle>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td nowrap>
<br>

<input type=submit name=submit size=32 value="Submit">

</td>
</tr>
</form>
</table>

<p>{$lng.txt_track_order_form_footer}</p>

{else}

<p>

<p>{$lng.txt_track_order_result_header}</p>

<p>
{if $orders}
{section name=num loop=$orders}

{$lng.lbl_order_id}: #{$orders[num].orderid}<br>
{* {$lng.lbl_order_date}: {$orders[num].date|date_format:$config.Appearance.date_format}< br> *}
{$lng.lbl_order_status}: {$orders[num].status}<br>
{if $orders[num].tracking}{$lng.lbl_tracking_number}: {$orders[num].tracking}{/if}

{/section}
{else}
<p>Sorry, your order was not found</p>
{/if}
</p>

<p>{$lng.txt_track_order_result_footer}</p>


{/if}


{/capture}
{include file="dialog.tpl" title="Order information" content=$smarty.capture.dialog extra="width=100%"}


Of course, I included the Order_track.php file in the home_main.tpl template. What am I missing? Why this mode does not work on 4.1.8?

Regards,

Lorena
__________________
Lorena Martinez
X-Cart v4.3.2
www.lapislazuliworld.com
Reply With Quote