Some companies will let you use an API which will allow you to display the details in your orders history page which is more complex, but overall a nice feature to have. You will likely need to have an account with the shipping company though.
Some companies will let you use an API which will allow you to display the details in your orders history page which is more complex, but overall a nice feature to have. You will likely need to have an account with the shipping company though.
Design75, thank you for correcting that, especially for those not familiar with PHP "construct" (spelling...)
Regarding application of this method of shipping info I still think this method of uri rewrite to obtain tracking info off of the web address regardless of who is asking is a less than desirable solution... The request should be posted to the next page which should validate that the request came from a ZC (customer) "user" otherwise, you may find the destination uri to be abused by other "visitors". Further if the input is not properly protected "upon receipt" may be open to other "trouble".
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
mc12345678 worked perfect thank you! You are talented my friend wish I was able to code like that!
Going to play around with it right now it echos to the top of the page as follows:
This order shipped in 3 boxes: Package 0: Click to Track Package 1: Click to Track Package 2: Click to Track
Is there a way to make Package count start at 1 not 0?
The input is protected by Google reCAPTCHA and the following:Regarding application of this method of shipping info I still think this method of uri rewrite to obtain tracking info off of the web address regardless of who is asking is a less than desirable solution... The request should be posted to the next page which should validate that the request came from a ZC (customer) "user" otherwise, you may find the destination uri to be abused by other "visitors". Further if the input is not properly protected "upon receipt" may be open to other "trouble".
So basically only a valid 8 digit order number (which is randomly generated at the time of order) is accepted otherwise nothing happens you receive an error to enter an 8 digit number, is that good?PHP Code:if (!empty($order_number) && ctype_digit($order_number) && preg_match('/^[0-9]{8}+$/', $order_number) && $error==false) {
Trying to redirect before echoing so I can format the results nicely on a new page, but it's not working. I think the output needs to be put into variables before doing this right?
PHP Code:$order_number=$_POST['order_number'];
$track_rs = $db->Execute("SELECT tracking_number FROM fulfill_tracking WHERE order_number = " . (int)$order_number);
if ($track_rs ->RecordCount() == 1) {
$track_num = $track_rs ->fields['tracking_number'];
header('Location: http://example.com/' . $track_num);
} elseif ($track_rs ->RecordCount() > 0) {
$track_num = array();
while(!$track_rs->EOF) {
$track_num[] = $track_rs ->fields['tracking_number'];
$track_rs->MoveNext();
}
zen_redirect(zen_href_link(FILENAME_TRACKING, 'action=multiple_packages'));
echo 'This order shipped in ' . sizeof($track_num). ' box' .(sizeof($track_num) != 1 ? 'es' : '') . ':';
echo "\n";
foreach ($track_num as $key => $val) {
echo 'Package ' . $key . ': <a href="http://example.com/' . $val . '">Click to Track</a>';
echo "\n";
}
} else {
$messageStack->add('tracking', ENTRY_ORDER_NUMBER_ERROR3);
}