only get the cart
the cart was created in the cart view. In the checkout we only want to display it.
This commit is contained in:
parent
494ce66631
commit
db737eca02
|
@ -351,12 +351,10 @@ def checkout(request):
|
||||||
# • cancelled -> Bestellung storniert
|
# • cancelled -> Bestellung storniert
|
||||||
# • on hold -> Bestellung pausiert
|
# • on hold -> Bestellung pausiert
|
||||||
|
|
||||||
cart_id, created_cart = ShoppingCart.objects.get_or_create(
|
cart = ShoppingCart.objects.get(user=request.user)
|
||||||
user=request.user)
|
if cart:
|
||||||
if created_cart is False:
|
|
||||||
# get all items in the cart of this customer:
|
# get all items in the cart of this customer:
|
||||||
cart_positions = CartPosition.objects.filter(
|
cart_positions = CartPosition.objects.filter(cart=cart)
|
||||||
cart=cart_id)
|
|
||||||
if (cart_positions.count()) > 0:
|
if (cart_positions.count()) > 0:
|
||||||
# make a list out of all articles:
|
# make a list out of all articles:
|
||||||
cart_position_list = list(cart_positions)
|
cart_position_list = list(cart_positions)
|
||||||
|
|
Loading…
Reference in New Issue