Developer forum

Forum » Rapido » Country Field in Cart Page

Country Field in Cart Page

Tan Pang Lin Dynamicweb Employee
Tan Pang Lin
Reply

Hi

I have setup the following

  • In the profile,  the country was set to Australia
  • In the country setup,  only Singapore was created
  • Validation group was setup for Customer's Country as required.
  • upon log in and add an item to cart,  
  • at the cart page,  I noted that the country was Null,   may I know was this an error?
  • I also noted the validation group did not kick in as I am able to make a payment even the country is null,  may I know was this an error?

please refer to this image for more detail,  

Thanks

Pang Lin


Replies

 
Nicolai Pedersen
Reply

Hi Pang Lin

It could be a bug in the checkout flow. I cannot see from you screendumps if you have remembered to add the validation and validation group to your cart settings. See my dump.

If not, that is probably the issue with the missing validation. But it also seems like the country field on the customer does not get filled out automatically in this case. Because the user has Australia selected, but the checkout only offers Singapore - so it ends up not having any country set, and the validation does not force the user to select Singapore (or other valid countries) - is that correctly understood?

I'll have QA look into this as well. But please check your paragraph setup - and maybe provide a dump for that.

Thanks, Nicolai

Capture.PNG
 
Olga Shedko Dynamicweb Employee
Olga Shedko
Reply

Hello Pang Lin

Checked issue carefully. It seems that Nicolai is right and you didn't add the validation group, validation field and error message text to your cart settings. If it's set - it throws up an error and forces the user to select a valid country.

Steps:

1. Go to Admin > Settings > Ecommerce > Orders > Validation groups > select "New validation group" ribbon-button > name group, select validation field = "Customer Country", click green "+" and add rule = "Required" > save
2. Go to Content > your Cart app settings > select Custom validation group > click "Add" button, select the field, enter error message > save
3. Go to your Cart in UI > click "T&C" checkbox, checkout button > then you will get an error message if valid country is not selected and checkout will not go through

Please see attached screens.

Best regards,

Olga | QA

 

1.png 2.png 3.png
 
Tan Pang Lin Dynamicweb Employee
Tan Pang Lin
Reply

Hi Nicolai and Olga

 

Thanks for the response and apology for the late reply.

 

Query raised

  1. Did I define the validation group in ecommerce settings?  The answer is Yes.
  2. Did I add the validation group in the cart setting?  The answer is Yes.

The error was in this video,  https://www.useloom.com/share/9ece7497cc2441e6a034a64cb76a4839,

  1. It was true that country field on the customer does not get filled out automatically. 
  2. Even the country was set to required, no errors kick in, and I can make the payment.
  3. If I will to log out and buy as a guest, from the video, you can see point 1 and point 2 defined above kicked in.

 

 
Olga Shedko Dynamicweb Employee
Olga Shedko
Reply

Hello Pang Lin,

Thank you very much for details and provided video. I was able to reproduce it. Seems that field validation is broken for payment types where checkout handler is selected. I've created new TFS Bug 46034 for it. Will be fixed in the next hotfix release.

Best regards,

Olga | QA

 

You must be logged in to post in the forum