make sure to add the delivery_address to invoice on successful checkout
modified: make_post_sell/views/cart.py
This commit is contained in:
parent
8e9d704f60
commit
3d0ad9f1be
1 changed files with 4 additions and 0 deletions
|
|
@ -470,6 +470,10 @@ def cart_complete_checkout(request):
|
|||
invoice.handling_option = cart.handling_option
|
||||
invoice.handling_cost_in_cents = cart.handling_cost_in_cents
|
||||
|
||||
# Copy the user's active address to the invoice
|
||||
if cart.physical_products:
|
||||
invoice.delivery_address = request.user.active_address.data
|
||||
|
||||
for product, quantity in product_quantity_tuple:
|
||||
product.unlock_for_user(request.user)
|
||||
request.dbsession.add(product)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue