kopia lustrzana https://github.com/longclawshop/longclaw
Correct order creation
rodzic
a1a05c6c1d
commit
dbc6c1492d
|
|
@ -1,11 +1,12 @@
|
|||
from django import forms
|
||||
from longclaw.longclawshipping.models import ShippingRate
|
||||
|
||||
class CheckoutForm(forms.Form):
|
||||
'''
|
||||
Captures extra info required for checkout
|
||||
'''
|
||||
email = forms.EmailField()
|
||||
shipping_option = forms.ChoiceField(required=False)
|
||||
shipping_option = forms.CharField(widget=forms.Select)
|
||||
different_billing_address = forms.BooleanField(required=False)
|
||||
class Media:
|
||||
js = ('checkout.js',)
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ def create_order(email,
|
|||
shipping_rate = get_shipping_cost(
|
||||
shipping_address.country.pk,
|
||||
shipping_option,
|
||||
site_settings)
|
||||
site_settings)['rate']
|
||||
else:
|
||||
shipping_rate = 0
|
||||
order = Order(
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue