Order Number print ($f_intOrderID) ?>
|
| Product Name |
Product ID |
Quantity |
Status |
$intCurRow = 0;
$blnCancelOK = false;
$blnShipped = false;
$strCancelBtn = "";
$strStatus="";
while($intCurRow < $intShRowCount)
{
if($ascShResult[$intCurRow]['fldShipmentID'] > 0)
{
$strStatus = "SHIPPED";
$blnShipped = true;
}
else
{
$strStatus = "PENDING";
$blnCancelOK = true;
}
?>
| print ($ascShResult[$intCurRow]['ProductName']) ?> |
print ($ascShResult[$intCurRow]['fldProductID']) ?> |
print ($ascShResult[$intCurRow]['fldQuantity']) ?> |
print ($strStatus) ;
$strWeight = $ascShResult[$intCurRow]['fldProductID']."_weight";
$strPrice = $ascShResult[$intCurRow]['fldProductID']."_price";
$strProductID = $ascShResult[$intCurRow]['fldProductID']."_id";
$strQuantity = $ascShResult[$intCurRow]['fldProductID']."_quantity";
?>
|
$intCurRow++;
}
if($blnCancelOK == true)
{
if($blnShipped == true)
{
$strCancelBtn = "Cancel and All Pending Items";
$strStatus="PARTIAL";
}
else
{
$strCancelBtn = "Cancel Order";
$strStatus="PENDING";
}
}
else
$strStatus="SHIPPED";
if(isset($ascOrResult['fldPaymentID']) && ($ascOrResult['fldPaymentID'] > 0))
{
$strSQL = "SELECT * FROM tblPayment WHERE fldPaymentID=".$ascOrResult['fldPaymentID'];
$sclPayResultID = $g_objDB->GetFirstRowOfSet($strSQL, &$ascPayResult, SQL_GET_ROW_COUNT, "Get Payment Data");
if($g_objDB->HasError())
{
$g_objDB->DisplayError(__FILE__, __LINE__, "Get Payment Data Failed");
include "bottom.phtml";
exit;
}
if(!($intPayRowCount = $g_objDB->GetRowCount($sclPayResultID)))
$ascPayResult['fldAmount'] = 0.0;
}
?>
|
|
if((!isset($fldComputeTaxes)) || ($fldComputeTaxes == 'Y'))
{
?>
| TAX :
|
print ($fldCurrencyChar." ".strval(sprintf("%6.2f",$ascOrResult['fldTaxCost']))) ?>
|
}
?>
| SHIPPING :
|
print ($fldCurrencyChar." ".strval(sprintf("%6.2f",$ascOrResult['fldShipCost']))) ?>
|
| TOTAL BILLED AMOUNT :
|
print ($fldCurrencyChar." ".strval(sprintf("%6.2f",$ascPayResult['fldAmount']))) ?>
|
| ORDER DATE :
|
print $ascOrResult['fldOrderDate'];
?>
|
if($strStatus == "SHIPPED")
{
?>
| SHIP DATE :
|
$strSQL ="SELECT * FROM tblShipments WHERE fldOrderID=$f_intOrderID";
//print $strSQL." ";
$sclShResultID = $g_objDB->GetFirstRowOfSet($strSQL, &$ascShResult, SQL_GET_ROW_COUNT, "Get Shipment Date");
if((!$g_objDB->HasError()) && ($g_objDB->GetRowCount($sclShResultID) > 0))
print $ascShResult['fldShipDate'];
else
print "UNKNOWN";
?>
|
}
if($g_strPayProcessor != "Manually")
{
?>
PAYMENT TRANSACTION ID :
AUTHORIZATION CODE :
TRANSACTION ORDER ID :
|
print ($ascPayResult['fldTransactionID']) ?>
print ($ascPayResult['fldAuthCode']) ?>
print ($ascPayResult['fldPaymentOrderID']) ?>
|
if($strStatus != "SHIPPED")
{
$strSQL = "SELECT * FROM tblPayment WHERE fldParentID='".$ascPayResult['fldPaymentID']."' AND fldStatus='ERROR'";
$sclChildPayResultID = 0;
$g_objDB->GetAllRows($strSQL, &$ascChildPayResult, &$blnMoreRows, SQL_GET_ROW_COUNT, &$sclChildPayResultID, "Look for any child payments");
if($g_objDB->HasError())
{
$g_objDB->DisplayError(__FILE__, __LINE__, "Getting child payment data failed");
include "bottom.phtml";
exit;
}
if($g_objDB->GetRowCount($sclChildPayResultID) > 0)
{
?>
| The payment settlement failed and therefore, final shipment of the order is on hold
pending resolution of the problems.
|
}
}
}
$strSQL = "SELECT * FROM tblShippers WHERE fldShipperID = ".$ascOrResult['fldShipperID'];
$sclShipResultID = $g_objDB->GetFirstRowOfSet($strSQL, &$ascShipResult, SQL_GET_ROW_COUNT, "Get Shippers");
if($g_objDB->HasError())
{
$g_objDB->DisplayError(__FILE__, __LINE__, "Get Shippers Failed");
}
if(($intShipCount = $g_objDB->GetRowCount($sclShipResultID)))
{
$intCurShip = 0;
?>
| SHIP USING :
|
print ($ascShipResult['fldCarrier']." - ".$ascShipResult['fldMethod']);
?>
|
unset($ascShipResult);
$g_objDB->FreeResults($sclShipResultID);
}
?>
| SHIP TO :
|
//print "ShipToID = ".$ascResult[fldShipToID]." ";
$strSQL = "SELECT addr.fldCompany,addr.fldStreet1,addr.fldStreet2,addr.fldCity,addr.fldRegion,addr.fldPostCode,addr.fldCountry,cust.fldFirstName,cust.fldLastName,cust.fldEmail FROM tblCustomer cust, tblAddress addr WHERE cust.fldCustomerID=".$ascOrResult['fldShipToID']." AND addr.fldAddressID=cust.fldAddressID";
$sclAddrResultID = $g_objDB->GetFirstRowOfSet($strSQL, &$ascAddrResult, SQL_GET_ROW_COUNT, "Get Customer Address");
if((!$g_objDB->HasError()) && $g_objDB->GetRowCount($sclAddrResultID))
{
$strCompany = $ascAddrResult['fldCompany'];
$strAddress1 = $ascAddrResult['fldStreet1'];
$strAddress2 = $ascAddrResult['fldStreet2'];
$strCity = $ascAddrResult['fldCity'];
$strRegion = $ascAddrResult['fldRegion'];
$strPostalCode = $ascAddrResult['fldPostCode'];
$strCountry = $ascAddrResult['fldCountry'];
$strFirstName = $ascAddrResult['fldFirstName'];
$strLastName = $ascAddrResult['fldLastName'];
$strCustEmail = $ascAddrResult['fldEmail'];
print ($strFirstName." ".$strLastName) ?>
if(isset($strCompany) && ($strCompany != ""))
{
print ($strCompany) ?>
}
print ($strAddress1) ?>
if(isset($strAddress2) && ($strAddress2 != ""))
{
print ($strAddress2) ?>
}
print ($strCity.", ".$strRegion." ".$strPostalCode) ?>
print ($strCountry);
unset($ascAddrResult);?>
$g_objDB->FreeResults($sclAddrResultID);
}
?>
|
| BILL TO :
|
//print "ShipToID = ".$ascResult[fldShipToID]." ";
$strSQL = "SELECT addr.fldCompany,addr.fldStreet1,addr.fldStreet2,addr.fldCity,addr.fldRegion,addr.fldPostCode,addr.fldCountry,cust.fldFirstName,cust.fldLastName,cust.fldEmail FROM tblCustomer cust, tblAddress addr WHERE cust.fldCustomerID=".$ascOrResult['fldCustomerID']." AND addr.fldAddressID=cust.fldAddressID";
$g_objDB->LogIt($strSQL."\n");
$sclAddrResultID = $g_objDB->GetFirstRowOfSet($strSQL, &$ascAddrResult, SQL_GET_ROW_COUNT, "Get Customer Address");
if((!$g_objDB->HasError()) && $g_objDB->GetRowCount($sclAddrResultID))
{
$strCompany = $ascAddrResult['fldCompany'];
$strAddress1 = $ascAddrResult['fldStreet1'];
$strAddress2 = $ascAddrResult['fldStreet2'];
$strCity = $ascAddrResult['fldCity'];
$strRegion = $ascAddrResult['fldRegion'];
$strPostalCode = $ascAddrResult['fldPostCode'];
$strCountry = $ascAddrResult['fldCountry'];
$strFirstName = $ascAddrResult['fldFirstName'];
$strLastName = $ascAddrResult['fldLastName'];
$strCustEmail = $ascAddrResult['fldEmail'];
print ($strFirstName." ".$strLastName) ?>
if(isset($strCompany) && ($strCompany != ""))
{
print ($strCompany) ?>
}
print ($strAddress1) ?>
if(isset($strAddress2) && ($strAddress2 != ""))
{
print ($strAddress2) ?>
}
print ($strCity.", ".$strRegion." ".$strPostalCode) ?>
print ($strCountry);
unset($ascAddrResult);?>
$g_objDB->FreeResults($sclAddrResultID);
}
?>
|
| CUSTOMER'S COMMENTS :
|
print ($ascOrResult['fldComment']) ?>
|
| MERCHANT'S MESSAGE :
|
print ($ascOrResult['fldMerchantMsg']) ?>
|
if($intPayRowCount)
{
$g_objDB->FreeResults($sclPayResultID);
unset($ascPayResult);
}
if($blnCancelOK == true)
{
?>
$strSQL = "SELECT * FROM tblCountry WHERE fldCountry='$strCountry'";
////print $strSQL." ";
$sclCountryResultID = $g_objDB->GetFirstRowOfSet($strSQL, &$ascCountryResult, SQL_GET_ROW_COUNT, "Get UPS Country");
if($g_objDB->HasError())
{
$g_objDB->DisplayError(__FILE__, __LINE__, "Get UPS Country Failed");
}
if($g_objDB->GetRowCount($sclCountryResultID))
{
$strShipCountry = $ascCountryResult['fldCountryUPS'];
$g_objDB->FreeResults($sclCountryResultID);
}
else
$strShipCountry = $strCountry;
?>
|
}
?>