Hi Freixas,
Tried everything but can't get rid of WRX from any addresses.
Anyone who creates an address, puts in the normal fields and tries to view it on the "My account" page will see WRX added to their address.
After the address saves, WRX is added before the postcode eg:
Name: Work
Address: Company
Firstname Surname
Street address 1
Street address 2
City, WRX Postal code
Phone: 1111 222 3333
Notice before post code the letters WRX?
This was not entered anywhere.
Really can't work it out, any ideas?
Dave.
Comments
Comment #1
freixas commentedI don't have much to offer you.
There would seem to be two possible sources for the WRX: either the code or the database.
Try using a recursive grep to search the code. The database will be harder, but you might look in the table containing the country and zone information.
Try using just the minimum set of modules you can get away with and see if the problem goes away.
Comment #2
dave_______1 commentedHi Freixas,
I searched the whole site code for WRX but couldn't find it.
I then downloaded a copy of the Database and searched for WRX and it exists in the 'uc_zones' table as the 'zone_code' for Wrexham.
As WRX is the last zone code in the database I think it might be adding it to every address, even if the user hasn't entered an address?
I've checked my settings for this here: /admin/store/settings/countries/edit/formats
I have setup a UK address with the following info:
!company
!first_name !last_name
!street1
!street2
!city
!postal_code
!country_name_if
I don't need to use a zone, but it seems to add one anyway and it seems to add the last one in the database, which is WRX!
Can you check your code and see if is set to add a zone in when there is none selected in the settings?
Thanks for your help, hope this helps.
Dave.
Comment #3
freixas commentedI'll try to check this out this weekend. Thanks for doing the search.
Comment #4
freixas commentedOk, I looked into this a bit. I couldn't actually reproduce your results,
Let me ask you a few questions that might help track this down:
Thanks for your help.
Comment #5
sgdev commentedI'm noticing this problem on our site. We are selling both downloadable videos and DVDs, therefore some orders have a shipping address and others do not. Therefore the shipping address block is enabled for the checkout page, but not displayed if the order has only downloadable items.
When reviewing a completed order (on a page such as "admin/store/orders/10") with no items to be shipped, the shipping address block is displayed as follows:
This is the key issue:
If there is no shipping associated with an order, the Ubercart code is still storing "840" in the
delivery_countryfield, and storing "0" in thedelivery_zonefield in theuc_orderstable. If you look in theuc_countriestable, 840 is the United States. If you look in theuc_zonestable, 0 is Wrexham (WRX).This is not the right way to handle this. Regardless of whether or not the shipping pane is enabled on the checkout page, nothing should be stored in the delivery fields in
uc_orderif the order does not have shippable items.Comment #6
sgdev commentedSorry, I just realized this is specifically for uc_addresses. We're having this issue with core Ubercart. Hopefully the information I provided above may shed some light on the issue.
Comment #7
freixas commentedYou'll need to report this to the Ubercart people. I have nothing to do with order addresses. I can only take the blame for addresses stored in the user's profile. :-)
There is probably a similar problem in the 5.x version of uc_addresses. It's been fixed in the 6.x version (see #368675: Non-shippable products error) and the 5.x version has not been a priority for me. That doesn't mean I won't fix it, it just means that it's lower in the queue. A good way to speed the fix is to send me a patch.
There is also a related bug I reported for the 6.x version of Ubercart: #374633: If no shipping address is requested, uc_order.ca.inc still tries to send email to delivery address.
Comment #8
dave_______1 commentedHi Everyone,
Figured this out!
If you don't have a default shop address i.e. place to deliver from then the site gets mixed up.
There must be a test somewhere that goes through everything, when it finds nothing the variable is still set to the last thing it found in the loop which is WRX
To fix it, put in a default address for your shop.
Hope this helps someone.
Dave.
Comment #9
freixas commentedThanks for the info. I've been on vacation and just got back. When I have a moment, I'll try to verify your info and see if I can figure out the problem's source.
Comment #10
freixas commentedHi, Dave,
I finally remembered I hadn't got around to looking at this.
I deleted my store address from the Shipping Quotes settings and from the Store Settings. I removed the !zone_code from both my US and Canada countries. I was not able to reproduce your problem.
I have backported a number of 6.x fixes into my 5.x-2.x-dev build, so you could try to update your uc_addresses version (keep the old one around as the updates haven't had a lot of testing), remove the store address and see if the problem has gone away.
If you don't want to do this, could you please let me know so I can close the bug report?
Comment #11
masox commentedHi everybody,
I had the same issue with the WRX showing up in the adress . I dont know what was causing it , but this is , how i bypassed this problem :
Go to "myPHPadmin" or whatever you are using to administer your databases . Export "uc_zones" table into CSV file and save in onto disc . Open it with notepad , find the line , where the WRX appears and replace the WRX with , for example , space. Save it , empty your existing table and import your modified version . ...your addresses should look now like this :
Name
Street
City, zipcode
country
The space will appear there , but its completely harmless and customer wont notice it .
Good luck everybody !
cheers
Tomas Karafa
Czech republic
Comment #12
rstaylor commentedI think that this occurs due to the following code in the uc_store.module:
Because there is a zone 0, the query will always return something if $zone is 0, NULL, or FALSE, so the (N/A, 'Unknown') result will not be used as expected.
Removing the !zone_code from your address format should keep the WRX from showing when it's empty, but would also prevent addresses that do have state/province info from displaying their abbreviations.
Comment #13
freixas commentedSounds good to me. I'm closing this bug. If someone would like to file a bug for Ubercart, feel free.