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'] = ' ';
}
CommentFileSizeAuthor
#2 285655.patch4.75 KBezra-g

Comments

rszrama’s picture

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. ; )

ezra-g’s picture

Status: Active » Needs review
StatusFileSize
new4.75 KB

I'm putting this up for review. This removes and restructures the if, elses in that function.

ezra-g’s picture

Status: Needs review » Reviewed & tested by the community
ezra-g’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Let's clean up this module for Drupal 6 :)!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.