Commits

Ian George committed c76373a

Updated order address adding view to respect international setting

  • Participants
  • Parent commits 3f98784

Comments (0)

Files changed (1)

quiet/shop/views/order.py

 from quiet.shop.utils import debug
 from quiet.common.emails import internal_mail
 
+from quiet.common.conf import config
+
 breadcrumb = {
     'details':{'selected':True, 'link':True},
     'shipping':{'selected':False, 'link':False},
             a_billing.city = form.cleaned_data['city']
             a_billing.county = form.cleaned_data['county']
             a_billing.postcode = form.cleaned_data['postcode']
-            a_billing.country = form.cleaned_data['country']
+            if config.shop.international:
+                a_billing.country = form.cleaned_data['country']
             a_billing.telephone = form.cleaned_data['telephone']
             a_billing.email = form.cleaned_data['email']
             a_billing.save()
                 a_delivery.city = form.cleaned_data['delivery_city']
                 a_delivery.county = form.cleaned_data['delivery_county']
                 a_delivery.postcode = form.cleaned_data['delivery_postcode']
-                a_delivery.country = form.cleaned_data['delivery_country']
+                if config.shop.international:
+                    a_delivery.country = form.cleaned_data['delivery_country']
 
                 a_delivery.save()