Open alexandervlpl opened 9 years ago
Did you solve it already?
No, this is the only way I can use the cart in my project.
Hello
I have the same issue and I do not know how to investigate. Can someone help me ?
I have no clue about where to start.
@lionelsaintecluque : is adding the cart to your template contexts not working? This was my workaround (see above).
I fixed the bug now.
In cart.py Iine 44 : self.session_key = session_key or carton_settings.CART_SESSION_KEY returns a list of a single item, this item is None. Then the block of code starting with : if self.session_key in self.session: fails. I catched the error with the following patch : try : products_queryset = self.get_queryset().filter(pk__in=ids_in_cart) except : products_queryset = []
Thanks for your reply.
I have django-carton installed correctly in my Django 1.8 project, and I can use the
Cart
object in my views as expected to add, delete and access items. Theget_cart
template tag does not seem to work, however. I included the carton_tags as documented:It looks like
cart
is justNone
. Theitems
list is empty. To access the items in my template, I have to pass them in from the view like this:Can anyone reproduce this? Am I missing something here?