Totally Zenned
- Join Date:
- May 2008
- Location:
- United States
- Posts:
- 516
- Plugin Contributions:
- 2
Write returned shipping quote vaules to order table
mc12345678:
Point of clarification/terminology. The assignment above is not related to a "define" in the sense of PHP. A define is a constant... Constants are intended NOT to be modifiable. (That's a variable. :) )
Got it thanks :)
But, to unset a variable well, unset($_SESSION['shipping_rate_ups']);
As to where in the code, there is a section I thought in the checkout_process header area but it might be as far in programming as the checkout_success section where other cart related session variables are reset/unset after the data has been captured for storage and technically I thought after that data has been captured in the database.
Solve this issue!
OLD code:
if ($rateReply->Service->Code == 03) {
if ($_SESSION['shipping_rate_ups'] == 0 || $_SESSION['shipping_rate_ups'] > $cost) {
$_SESSION['shipping_rate_ups'] = $cost;
}
}
if ($rateReply->Service->Code == 92 || $rateReply->Service->Code == 93) {
if ($_SESSION['shipping_rate_ups_surepost'] == 0 || $_SESSION['shipping_rate_ups_surepost'] > $cost) {
$_SESSION['shipping_rate_ups_surepost'] = $cost;
}
}
NEW code:
if ($rateReply->Service->Code == 03) {
if ($_SESSION['shipping_rate_ups'] == 0 || $_SESSION['shipping_rate_ups'] <> $cost) {
$_SESSION['shipping_rate_ups'] = $cost;
}
}
if ($rateReply->Service->Code == 92 || $rateReply->Service->Code == 93) {
if ($_SESSION['shipping_rate_ups_surepost'] == 0 || $_SESSION['shipping_rate_ups_surepost'] <> $cost) {
$_SESSION['shipping_rate_ups_surepost'] = $cost;
}
}