I don't understand why the following checks are in the module, but the end result is that !delivery_country_name, !billing_country_name, !delivery_country_code, and !billing_country_code are not set at all if the country is USA or Canada. There are four of these checks in the code. I replaced all four conditional expressions with "if (FALSE) {}" and it fixed the problem. (This is not the best fix, but I don't know what the intent of the code is so I didn't want to mess with the "else" part of the statements; this was the smallest change needed to achieve the desired result.)
if ($order['delivery_country'] == 124 || $order['delivery_country'] == 840) {
$values['!delivery_country_name'] = ' ';
}if ($order['billing_country'] == 124 || $order['billing_country'] == 840) {
$values['!billing_country_name'] = ' ';
}if ($order['delivery_country'] == 124 || $order['delivery_country'] == 840) {
$values['!delivery_country_code'] = ' ';
}if ($order['billing_country'] == 124 || $order['billing_country'] == 840) {
$values['!billing_country_code'] = ' ';
}| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 285655.patch | 4.75 KB | ezra-g |
Comments
Comment #1
rszrama commentedheh I bet it was from when this module was developed I was writing it for a guy that only needed the country if it was outside of North America. I imagine those chunks can just be totally removed. Thanks for digging that up. ; )
Comment #2
ezra-g commentedI'm putting this up for review. This removes and restructures the if, elses in that function.
Comment #3
ezra-g commentedComment #4
ezra-g commentedCommitted. Let's clean up this module for Drupal 6 :)!