kapilt / getpaid

Automatically exported from code.google.com/p/getpaid
0 stars 0 forks source link

state field on checkout page is bringing back all the possible states #179

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am not sure what is creating the problem yet, but am going to look into
it. I tried with a clean get paid buildout.

What steps will reproduce the problem?
1. add an item to your cart
2. go to your cart and checkout
3. fill the form with your contact information and billing/mailing address
4. click continue
5. now abandon the page and add an other item to your cart
6. click the checkout button again
7. you arrive on the checkout page and the state drop down menu is huge
(instead of containing only the US states)

What is the expected output? What do you see instead?
The drop down menu for the states should contain only the states related to
the country selected.
If I change the country, it doesn't do anything.

Original issue reported on code.google.com by lucielej...@gmail.com on 21 Feb 2008 at 4:35

GoogleCodeExporter commented 8 years ago
also, restarting my instance fixes the problem, until I do again the steps 1 to 
7.

Original comment by lucielej...@gmail.com on 21 Feb 2008 at 4:38

GoogleCodeExporter commented 8 years ago
So apparently the custom widget for the the Country and the State is not saved.

In Product.PloneGetPaid.browser.checkout in the class CheckoutAddress, the 
custom
widget for the Country and State are assigned at the beginning of the class.

I put a pdb trace, and so the first time I go to the checkout, it uses those 
custom
widgets. But the second time I go to the checkout, and I look at the fields, 
they
don't have anymore custom widget on them and it uses the DropdownWidget by 
default.

I am not sure why the custom widget value disappears.

Original comment by lucielej...@gmail.com on 21 Feb 2008 at 8:15

GoogleCodeExporter commented 8 years ago
I have figured out why the custom widget disappear:
in this page (with the r1247 changes):
http://groups.google.com/group/getpaid-changes/browse_thread/thread/8e5823aedd14
5f1b/461d98ec67620786#461d98ec67620786
search for "if field.custom_widget is not None:"

you will see that the custom widget are deleted automatically...

Original comment by lucielej...@gmail.com on 21 Feb 2008 at 8:24

GoogleCodeExporter commented 8 years ago
this has been solved by Kapil on r1276

Original comment by lucielej...@gmail.com on 21 Feb 2008 at 9:33