Download & Extend

Info deliberately not set for US/Canada?

Project:Ubercart EDI
Version:5.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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'] = ' ';
}

Comments

#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

Status:active» needs review

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

AttachmentSize
285655.patch 4.75 KB

#3

Status:needs review» reviewed & tested by the community

#4

Status:reviewed & tested by the community» fixed

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

#5

Status:fixed» closed (fixed)

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

nobody click here