Q: Multiple Cart Objects Returned at 'succesfull' checkout. What goes wrong?

44 views
Skip to first unread message

Coen

unread,
Apr 19, 2012, 12:28:47 PM4/19/12
to djang...@googlegroups.com
Hello group,

I'm new to django-shop and like it! I got quite far. But now I'm stuck. :/

In my shop, when a payment is successful the payment backend calls confirm_payment(order, amount, transaction_id, save=True). The first time this works fine. There is only one cart-item in the db. If there are more than one carts I get this error:

MultipleObjectsReturned at /shop/pay/ideal/report/
get() returned more than one MyCart -- it returned 2! Lookup parameters were {'user': None}

/shop/pay/ideal/report/?transaction_id=### is requested ul by the bank to indicate the transaction is finished.

All cart objects have user_id null. Because I don't let users login. But with multiple carts in de db the django-shop payment api can't get the cart_object by user:

/Library/Python/2.6/site-packages/django_shop-0.0.13.dev0-py2.6.egg/shop/payment/api.py in confirm_payment
cart_object = Cart.objects.get(user=order.user)
cart_object.empty()

How can I keep track of transaction-user-cart relationships without having my customers to login? Or am I missing something else?
All help and suggestions are appreciated!

/C

Владислав Тарасенко

unread,
Aug 9, 2012, 6:56:26 PM8/9/12
to djang...@googlegroups.com
Can you show us all tracelog ?
not only last line

Ales Kocjancic

unread,
Sep 12, 2012, 6:21:31 PM9/12/12
to djang...@googlegroups.com
Hi,
I see you are using a development version of the shop. This specific issue should now be fixed in the master branch and will be in the next official release.
Cheers,
Ales
Reply all
Reply to author
Forward
0 new messages