Info deliberately not set for US/Canada?
TR - July 22, 2008 - 06:59
| Project: | Ubercart EDI |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
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'] = ' ';
}
#1
heh 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. ; )
#2
I'm putting this up for review. This removes and restructures the if, elses in that function.
#3
#4
Committed. Let's clean up this module for Drupal 6 :)!
#5
Automatically closed -- issue fixed for two weeks with no activity.