spree / spree_wombat

Connect your Spree Commerce storefront to Wombat
BSD 3-Clause "New" or "Revised" License
31 stars 53 forks source link

International State Names Broken in Shipment Handlers #12

Closed iloveitaly closed 10 years ago

iloveitaly commented 10 years ago

The shipment handlers do not fallback to setting the state_name of an address object if a state object cannot be found, instead an exception is thrown. We ship orders internationally, but do not have the states of all of the countries which ship to in the spree database, so for us this throws an exception and the order is not shipped.

Would there be any reason if a state object cannot be found we shouldn't just use the state_name field?

radar commented 10 years ago

I agree that this should fall back. Can you please submit a patch for this?

peterberkenbosch commented 10 years ago

@iloveitaly working on it. Agree that raising an exception is a bit to tight.

peterberkenbosch commented 10 years ago

@iloveitaly I changed the logic on 1-3-stable. Working on getting the specs green again. There are some issues with rspec and posting json there. current WIP is here: https://github.com/spree/spree_wombat/tree/fallback-to-state_name

peterberkenbosch commented 10 years ago

Closed with 612a3a484c054cc78deb9047e50e647b0ad7ec59

peterberkenbosch commented 10 years ago

@iloveitaly should be good to go now!

iloveitaly commented 10 years ago

Tested this today, worked great! Thanks @peterberkenbosch!