I think that "required fields" relates to whether a field can be left
empty by an user or made hidden by an developer, not whether field can
be removed from the template (never should do it or on own
responsibility) What do you exactly mean?

> I have noticed that the Satchmo code doesn't always respect the
> choices of required billing and shipping fields that I set in the shop
> settings.

I send patches related this things to Chris some time ago. I must look
at it.

On Mar 3, 9:04 pm, allan <[email protected]> wrote:
> I have noticed that the Satchmo code doesn't always respect the
> choices of required billing and shipping fields that I set in the shop
> settings.  I believe that others have mentioned this regarding state
> and postal code fields.  Now I'm referring to the country fields.
>
> I notice that some of the code, particularly in the class
> ContactInfoForm in the file satchmo_store/contact/forms.py, doesn't
> even check the shop settings as to whether or not some fields should
> be required.  The country fields are examples.  The methods
> clean_country(), clean_state() and clean_ship_country() raise error
> exceptions if a billing or shipping country value is missing,
> regardless of the shop settings.
>
> This isn't an issue for many shops, since they have a default country
> and the country menus are initialized to that.  But it is an issue for
> some shops, especially customized ones.  Mine is an example: I don't
> use the billing-address form at all.
>
> I can understand that other parts of the logic may assume that a
> country value is always present.  In the thread "Is it possible to
> disable billing address?" I mentioned the patch I made: in the methods
> I just mentioned, instead of raising an exception, use
> self._default_country, which in ContactInfoForm is the country of the
> shop.
>
> Couldn't that be what the standard Satchmo code does when the site
> settings say that a billing or shipping country is not required?  For
> most of us, if not all, it's quite normal to omit the country when
> addresssing a package, if we mean "this country".  I'm sure that's how
> the postal services of most countries interpret an address that
> doesn't include a country.
>
> Perhaps the country menus could even have "no country" added as an
> option.  There could be a dummy Country object with a blank name.  It
> would be treated, when selected, as "this country".

-- 
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en.

Reply via email to