Openfoodnetwork: Can't place an order if my address is not from main instance country

Created on 1 Mar 2018  路  8Comments  路  Source: openfoodfoundation/openfoodnetwork

Description

If a customer living in Spain for instance want to order on OFFrance to a hub and try to put a Spanish address, he can't place his order because states don't update when he switches country (and can't place order, just not going through, not possible to make the states list update...)

Expected Behavior

If I switch country the corresponding list of states is proposed dynamically.

Actual Behavior

If I switch country the list of states proposed doesn't change, still the ones from the previous country.

Steps to Reproduce

  1. Make sure you use an instance that has states for more than one country.
  2. Try to place an order, at checkout change country, you will see that states don't update.

Animated Gif/Screenshot

https://www.useloom.com/share/f4209daa2baa43dd9ea0a1edc3f39f6b

Context

I hit that issue while testing bug fix in customer edit address PR2074

Severity

S3, fundamental feature (placing order) and no workaround, but it's not affecting any users (hopefully) for now...

Your Environment

  • Version used: Aus staging with branch PR2074
  • Browser name and version: Version 64.0.3282.167 (Official Build) (64-bit)
  • Operating System and version (desktop or mobile): Ubuntu 16.04 LTS

Possible Fix

Update state dynamically.
If state was selected before country is changes, empty dynamically while switching states list.

bug-s3

All 8 comments

@myriamboure I think the platform was designed to only work in one country, thus the problem.

Which makes me wonder whether this is actually a severity 2 bug...or a design flaw that needs to be fixed for a new multi-country customer type?

But then maybe I'm wrong and this is actually just a states bug? Not sure. If you determine it is a severity 2 then should we be putting this into the dev ready column to be fixed as a priority?

I'm not sure as the VAT zone design is handled properly, it already enables to buy from one country, to another country... but I suggest to move it to S3 as it's not affecting any user for now (I suppose) so let's not make it in our pipe for now...

@mllocs keep this in mind :wink:

I just tested this on katuma's live environment and verified this is a blocker issue for Portuguese golive on katuma. I can't checkout with a Portuguese billing address (400 bad request). The only way I can checkout from a Portuguese shop on katuma is by selecting Spain as a country on the billing address.

@luisramos0 perhaps this is something that you could work on with assistance from @enricostano and @sauloperez and @myriamboure, in terms of designing a solution? Seems it's rather important for you to be able to get Portugal live....

I think @luisramos0 is already on it @daniellemoorhead he submited a first PR on a connected issue that needs to be merged in my understanding for him to move forward on this one, see https://github.com/openfoodfoundation/openfoodnetwork/issues/1538

Hi @daniellemoorhead, @myriamboure, actually I started with this one. PR #2341 fixes this issue. I am waiting for a code review.

Well that's exciting news 馃槃

asyouwere

Was this page helpful?
0 / 5 - 0 ratings